You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Aaron Oneal (JIRA)" <ji...@apache.org> on 2009/05/30 08:53:07 UTC

[jira] Updated: (AXIS2C-1040) AXIS2/C Static Build Required

     [ https://issues.apache.org/jira/browse/AXIS2C-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Oneal updated AXIS2C-1040:
--------------------------------

    Attachment: class_loader.c.diff
                axutil_class_loader.h.diff

Attached you will find patches to the class loader to enable registrations for statically linked classes. The key new functions are as follows:

    AXIS2_EXTERN axis2_status_t AXIS2_CALL
    axutil_class_loader_static_linkage_init(
        const axutil_env_t * env);

    AXIS2_EXTERN void AXIS2_CALL
    axutil_class_loader_static_linkage_uninit(
        const axutil_env_t * env);

    AXIS2_EXTERN axis2_status_t AXIS2_CALL
    axutil_class_loader_static_linkage_register(
        const axutil_env_t * env, const axis2_char_t* class_name,
        CREATE_FUNCT create_funct, DELETE_FUNCT delete_funct);

Usage:

        // Set up the environment
        env = axutil_env_create_all("Test_axis2c.log", AXIS2_LOG_LEVEL_TRACE);
        CPPUNIT_ASSERT(env);

        // Register HTTP transport
        axutil_class_loader_static_linkage_init(env);
        axutil_class_loader_static_linkage_register(env, "axis2_http_sender",
            (CREATE_FUNCT)axis2_http_transport_sender_get_instance,
            (DELETE_FUNCT)axis2_http_transport_sender_remove_instance);
        axutil_class_loader_static_linkage_register(env, "axis2_http_receiver",
            (CREATE_FUNCT)axis2_http_transport_receiver_get_instance,
            (DELETE_FUNCT)axis2_http_transport_receiver_remove_instance);

        // Create the client and make service calls
        // ...

        // Unregister HTTP transport
        axutil_class_loader_static_linkage_uninit(env);

        // Free env
        axutil_env_free((axutil_env_t *) env);

Suggested future work:
 - Move init/uninit into axutil_env so that this happens automatically as part of create/free

> AXIS2/C Static Build Required
> -----------------------------
>
>                 Key: AXIS2C-1040
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1040
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: util
>         Environment: MS Windows
>            Reporter: Frank Huebbers
>            Assignee: Senaka Fernando
>         Attachments: axutil_class_loader.h.diff, class_loader.c.diff
>
>
> I have seen a few places where the typedef AXIS2_EXPORT is used instead of AXIS2_EXTERN. Doing a simple search, I have seen this in the following fiels:
> - axis2_msg_recv.h
> - msg_recv.c
> - raw_xml_in_out_msg_recv.c
> - svr_callback.c
> - mod_addr.c
> - http_transport_sender.c
> - http_receiver.c
> - http_svr_thread.c
> - tcp_transport_sender.c
> - tcp_svr_thread.c
> - tcp_receiver.c
> Note that the definitions are correct in the header files.
> Frank

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.