You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ruchith Udayanga Fernando (JIRA)" <ji...@apache.org> on 2005/09/23 18:09:28 UTC

[jira] Created: (AXIS2-239) Cannot load service specific classes by external modules

Cannot load service specific classes by external modules
--------------------------------------------------------

         Key: AXIS2-239
         URL: http://issues.apache.org/jira/browse/AXIS2-239
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug
  Components: deployment  
    Reporter: Ruchith Udayanga Fernando


Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.

We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 

Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.

Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-239) Cannot load service specific classes by external modules

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-239?page=comments#action_12330294 ] 

Deepal Jayasinghe commented on AXIS2-239:
-----------------------------------------

As I know in first F2F we had in Colombo we decided to introduce the concept of service isolation. That is why we are creating a classloader for each services in the system , by giving CL as its parent , I am -1 on if we are going to change axis2 architecture in order to support WS-Security.

Why can not you use service.getClassloader as your class loader ? , if WSS4J does not have a method to take custom class loader we have to fix that not axis2, as far as security module is concern it is just an extension module.


> Cannot load service specific classes by external modules
> --------------------------------------------------------
>
>          Key: AXIS2-239
>          URL: http://issues.apache.org/jira/browse/AXIS2-239
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: deployment
>     Reporter: Ruchith Udayanga Fernando

>
> Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.
> We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 
> Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.
> Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS2-239) Cannot load service specific classes by external modules

Posted by "Ruchith Udayanga Fernando (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-239?page=all ]
     
Ruchith Udayanga Fernando resolved AXIS2-239:
---------------------------------------------

    Resolution: Fixed

> Cannot load service specific classes by external modules
> --------------------------------------------------------
>
>          Key: AXIS2-239
>          URL: http://issues.apache.org/jira/browse/AXIS2-239
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: deployment
>     Reporter: Ruchith Udayanga Fernando

>
> Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.
> We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 
> Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.
> Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-239) Cannot load service specific classes by external modules

Posted by "Ruchith Udayanga Fernando (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-239?page=comments#action_12330298 ] 

Ruchith Udayanga Fernando commented on AXIS2-239:
-------------------------------------------------

Alright ... I'll try changing the handlers in the security module to do what dims suggested. :-)

> Cannot load service specific classes by external modules
> --------------------------------------------------------
>
>          Key: AXIS2-239
>          URL: http://issues.apache.org/jira/browse/AXIS2-239
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: deployment
>     Reporter: Ruchith Udayanga Fernando

>
> Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.
> We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 
> Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.
> Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-239) Cannot load service specific classes by external modules

Posted by "Srinath Perera (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-239?page=comments#action_12330425 ] 

Srinath Perera commented on AXIS2-239:
--------------------------------------

dims is it impossible to do this without using the  Thread.setContextClassLoader()? I prefer not to share information via static place holders. For an example
Axis2 do not have MessageContext.getMessageContext() nor AxisResgistry is static. 

I think ruchith's concern is valied concern, can not we revised our classloding hireachy for the modules to have the service classloaders (one it engages now) as the parent class loder

> Cannot load service specific classes by external modules
> --------------------------------------------------------
>
>          Key: AXIS2-239
>          URL: http://issues.apache.org/jira/browse/AXIS2-239
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: deployment
>     Reporter: Ruchith Udayanga Fernando

>
> Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.
> We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 
> Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.
> Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-239) Cannot load service specific classes by external modules

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-239?page=comments#action_12330430 ] 

Davanum Srinivas commented on AXIS2-239:
----------------------------------------

We can add a hook in wss4j to set the classloader to be used for loading the classes....would that work?

> Cannot load service specific classes by external modules
> --------------------------------------------------------
>
>          Key: AXIS2-239
>          URL: http://issues.apache.org/jira/browse/AXIS2-239
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: deployment
>     Reporter: Ruchith Udayanga Fernando

>
> Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.
> We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 
> Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.
> Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-239) Cannot load service specific classes by external modules

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-239?page=comments#action_12330295 ] 

Davanum Srinivas commented on AXIS2-239:
----------------------------------------

Deepal,

No, we are not changing architecture. we need to fix security module to use the service.classloader (we can do this by setting Thread.setContextClassLoader()) before we call wss4j code.

-- dims

> Cannot load service specific classes by external modules
> --------------------------------------------------------
>
>          Key: AXIS2-239
>          URL: http://issues.apache.org/jira/browse/AXIS2-239
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: deployment
>     Reporter: Ruchith Udayanga Fernando

>
> Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.
> We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 
> Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.
> Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-239) Cannot load service specific classes by external modules

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-239?page=comments#action_12330297 ] 

Deepal Jayasinghe commented on AXIS2-239:
-----------------------------------------

yes, we can use that method , but I think we need to set the original CL back dont we ?

> Cannot load service specific classes by external modules
> --------------------------------------------------------
>
>          Key: AXIS2-239
>          URL: http://issues.apache.org/jira/browse/AXIS2-239
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: deployment
>     Reporter: Ruchith Udayanga Fernando

>
> Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.
> We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 
> Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.
> Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-239) Cannot load service specific classes by external modules

Posted by "Ruchith Udayanga Fernando (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-239?page=comments#action_12330466 ] 

Ruchith Udayanga Fernando commented on AXIS2-239:
-------------------------------------------------

Right now the security handlers are updated to switch to the classloader of the service *only* when using WSS4J and it switches back to the original class loader once the security related stuff are done, using Thread.setContextClassLoader().

Adding a hook in in wss4j should work as well

> Cannot load service specific classes by external modules
> --------------------------------------------------------
>
>          Key: AXIS2-239
>          URL: http://issues.apache.org/jira/browse/AXIS2-239
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: deployment
>     Reporter: Ruchith Udayanga Fernando

>
> Right now we cannot load classes available in the service archive (.aar file) by modules that are configured to be engaged for that service.
> We experience this when we try to use the security module where the security module (WSS4J) will have to load the password callback class to get the password information from the developers. Intuitively this password callback class should be packaged with the service archive. 
> Currently Axis2 uses a specific class loader to load the classes that belong to a service form it archive. And the service archives are not in the scope the context class loader. But IMHO since WSS4J uses the context class loader to pickup the password callback class it will not pickup the class that is available in the service archive.
> Should we change Axis2 to support the above behaviour where the external module can load classes available in the service archive?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira