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 Doug Davis <du...@us.ibm.com> on 2007/02/14 23:06:12 UTC

accessing methods in a module

If I have a module that exposes some static utility methods - what is the 
way axis2 developers are supposed to model that?
For example, let's say a popular module like WS-Addressing were to expose 
some utility method to convert a chunk of XML into an EPR.  Clearly logic 
that falls within the WS-Addressing module's domain but useful for more 
than just the module itself.  Applications (on the client and/or server) 
may need this kind of utility for their own purposes.  From my 
understanding, the module classloading logic in axis2 is such that if I 
wanted to expose these static methods I would need to duplicate the 
appropriate jar files.  In other words, I need to copy the jars from the 
.mar file out into the normal classloader path - e.g. WEB-INF/lib.  If 
correct, this seems less then friendly since from the application's point 
of view, once the module is engaged they may wonder why those classes are 
not available to be used - and this would mean that module developers 
would need to package their code in such a way that jars could easily be 
extracted for reuse outside of the module w/o duplicating all jars (and 
they would need to communicate which jars need to be copied in their 
docs). 

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com

Re: accessing methods in a module

Posted by Davanum Srinivas <da...@gmail.com>.
Doug,

Please log it as an enchancement request. Let's see what we can do.

thanks,
dims

On 2/15/07, Doug Davis <du...@us.ibm.com> wrote:
>
>   It could be but for some reason it feels different.  I have this image in my head that when I create a *.mar file its a self contained unit of functionality and people can move it around as needed.  Not unlike a *.jar file.  Its a collection of pieces needed for a particular piece of functionality. In this case the functionality is for 'axis' and the scope under which it works is 'axis'.  Now, I agree that perhaps the classes in a *.mar need to be scoped in some way - for example, perhaps not all modules are engaged for a particular invocation of a service, so in those situations I can understand why the classes in that module would be hidden.  However, in cases where the module is engaged shouldn't the classes within that module be visible?  IMO, the turning on of a module is akin to adding a jar file to your classpath. But I could be thinking about modules incorrectly.
>   I agree that I could create a shared utility jar but then if feels like I lose some of the benefits of having a *.mar in the first place. Having a single package that I can drop into my axis environment w/o having to also carry around secondary set of jar files to work around classloader issues just feels less than optimal - from a usability perspective.
>
>  thanks
>  -Doug
>  ______________________________________________________
>  STSM  |  Web Services Architect  |  IBM Software Group
>  (919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com
>
>
>
>  "Manoj Khangaonkar" <kh...@gmail.com>
>
> 02/15/2007 02:43 PM
>
> Please respond to
>  axis-dev@ws.apache.org
>
>
> To axis-dev@ws.apache.org
>
>
> cc
>
>
> Subject Re: accessing methods in a module
>
>
>
>
>
>
>
>
> Doug,
>
> Is this problem any different from any other code re-use problem with says EJB jars or WEB wars , Service aars ?
>
> In most of these cases - an "application" classloader with load the classes in the jar/war. So classes
> in 1 jar/war are not visible to others.
>
> Any utility classes that need to be shared - are first packaged as utility jars. But the utility jar needs to
> be copied and packaged with each EJB jar/WEB war that needs to use the utility classes.
>
> Mj
>
>
>
>
> On 2/15/07, Doug Davis <du...@us.ibm.com> wrote:
>
>  I suspect that moving all utils (from all modules) into the kernel isn't an option  :-)
>
>  thanks
>  -Doug
>  ______________________________________________________
>  STSM  |  Web Services Architect  |  IBM Software Group
>  (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
>
>
>  "David Illsley" <da...@gmail.com>
>
> 02/15/2007 03:49 AM
>
>
> Please respond to
>  axis-dev@ws.apache.org
>
>
>
>
> To axis-dev@ws.apache.org, dims@apache.org
>
> cc
>
>
> Subject Re: accessing methods in a module
>
>
>
>
>
>
>
>
>
>
>
>  Hi Doug,
>  The example you picked actually happened... did you know that? The
>  toOM/fromOM for EndpointReference are now in the kernel module so they
>  are available to everyone. The reason I did't push for services to be
>  able to access classes in mars is because it would still be a
>  development time headache to persuade my favoured IDE to look inside a
>  jar in a mar.
>
>  David
>
>  On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
>  > Doug,
>  >
>  > Come to think of it. i think If you place the mar file in WEB-INF/lib.
>  > The module is loaded and the code in there is available to services.
>  > Need to test it of course...
>  >
>  > -- dims
>  >
>  > On 2/14/07, Doug Davis < dug@us.ibm.com> wrote:
>  > >
>  > > If I have a module that exposes some static utility methods - what is the
>  > > way axis2 developers are supposed to model that?
>  > > For example, let's say a popular module like WS-Addressing were to expose
>  > > some utility method to convert a chunk of XML into an EPR.  Clearly logic
>  > > that falls within the WS-Addressing module's domain but useful for more than
>  > > just the module itself.  Applications (on the client and/or server) may need
>  > > this kind of utility for their own purposes.  From my understanding, the
>  > > module classloading logic in axis2 is such that if I wanted to expose these
>  > > static methods I would need to duplicate the appropriate jar files.  In
>  > > other words, I need to copy the jars from the .mar file out into the normal
>  > > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
>  > > friendly since from the application's point of view, once the module is
>  > > engaged they may wonder why those classes are not available to be used - and
>  > > this would mean that module developers would need to package their code in
>  > > such a way that jars could easily be extracted for reuse outside of the
>  > > module w/o duplicating all jars (and they would need to communicate which
>  > > jars need to be copied in their docs).
>  > >
>  > >  thanks
>  > >  -Doug
>  > >  ______________________________________________________
>  > >  STSM  |  Web Services Architect  |  IBM Software Group
>  > >  (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
>  >
>  >
>  > --
>  > Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>  > For additional commands, e-mail: axis-dev-help@ws.apache.org
>  >
>  >
>
>
>  --
>  David Illsley - IBM Web Services Development
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
>



-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: accessing methods in a module

Posted by Davanum Srinivas <da...@gmail.com>.
We need to write it up:
http://marc.theaimsgroup.com/?l=axis-user&m=116922275721725&w=2

Thanks,
PS: Please switch your email client to send plain text messages.

On 2/15/07, Doug Davis <du...@us.ibm.com> wrote:
>
> Just curious, do you have a URL to some docs that describe this ServiceTCCL option?
> I googled it but only found references to Spring and I'm not using that.
>
>  thanks
>  -Doug
>  ______________________________________________________
>  STSM  |  Web Services Architect  |  IBM Software Group
>  (919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com
>
>
>
>  "Davanum Srinivas" <da...@gmail.com>
>
> 02/15/2007 03:21 PM
>
> Please respond to
>  axis-dev@ws.apache.org
>
>
> To axis-dev@ws.apache.org
>
>
> cc
>
>
> Subject Re: accessing methods in a module
>
>
>
>
>
>
>
>
> Doug,
>
>  Seconding Manoj's thoughts. Having a shared utility jar in WEB-INF/lib
>  and using those classes in both a mar and aar. Will that solve the
>  problem? Please raise a JIRA for that if that does not work with the
>  following parameter in your service.xml
>
>  <parameter name="ServiceTCCL" locked="false">composite</parameter>
>
>  thanks,
>  dims
>
>  PS: Please don't post html to the list. Please switch your email
>  client to send plain text.
>
>  On 2/15/07, Manoj Khangaonkar <kh...@gmail.com> wrote:
>  >
>  > Doug,
>  >
>  > Is this problem any different from any other code re-use problem with says EJB jars or WEB wars , Service aars ?
>  >
>  > In most of these cases - an "application" classloader with load the classes in the jar/war. So classes
>  > in 1 jar/war are not visible to others.
>  >
>  > Any utility classes that need to be shared - are first packaged as utility jars. But the utility jar needs to
>  > be copied and packaged with each EJB jar/WEB war that needs to use the utility classes.
>  >
>  > Mj
>  >
>  >
>  >
>  >
>  >
>  > On 2/15/07, Doug Davis <du...@us.ibm.com> wrote:
>  > >
>  > > I suspect that moving all utils (from all modules) into the kernel isn't an option  :-)
>  > >
>  > > thanks
>  > > -Doug
>  > > ______________________________________________________
>  > > STSM  |  Web Services Architect  |  IBM Software Group
>  > > (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
>  > >
>  > >
>  > >
>  > >  "David Illsley" <da...@gmail.com>
>  > >
>  > > 02/15/2007 03:49 AM
>  > >
>  > > Please respond to
>  > > axis-dev@ws.apache.org
>  > >
>  > >
>  > > To axis-dev@ws.apache.org,  dims@apache.org
>  > >
>  > > cc
>  > >
>  > >
>  > > Subject Re: accessing methods in a module
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > > Hi Doug,
>  > > The example you picked actually happened... did you know that? The
>  > > toOM/fromOM for EndpointReference are now in the kernel module so they
>  > > are available to everyone. The reason I did't push for services to be
>  > > able to access classes in mars is because it would still be a
>  > > development time headache to persuade my favoured IDE to look inside a
>  > > jar in a mar.
>  > >
>  > > David
>  > >
>  > > On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
>  > > > Doug,
>  > > >
>  > > > Come to think of it. i think If you place the mar file in WEB-INF/lib.
>  > > > The module is loaded and the code in there is available to services.
>  > > > Need to test it of course...
>  > > >
>  > > > -- dims
>  > > >
>  > > > On 2/14/07, Doug Davis < dug@us.ibm.com> wrote:
>  > > > >
>  > > > > If I have a module that exposes some static utility methods - what is the
>  > > > > way axis2 developers are supposed to model that?
>  > > > > For example, let's say a popular module like WS-Addressing were to expose
>  > > > > some utility method to convert a chunk of XML into an EPR.  Clearly logic
>  > > > > that falls within the WS-Addressing module's domain but useful for more than
>  > > > > just the module itself.  Applications (on the client and/or server) may need
>  > > > > this kind of utility for their own purposes.  From my understanding, the
>  > > > > module classloading logic in axis2 is such that if I wanted to expose these
>  > > > > static methods I would need to duplicate the appropriate jar files.  In
>  > > > > other words, I need to copy the jars from the .mar file out into the normal
>  > > > > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
>  > > > > friendly since from the application's point of view, once the module is
>  > > > > engaged they may wonder why those classes are not available to be used - and
>  > > > > this would mean that module developers would need to package their code in
>  > > > > such a way that jars could easily be extracted for reuse outside of the
>  > > > > module w/o duplicating all jars (and they would need to communicate which
>  > > > > jars need to be copied in their docs).
>  > > > >
>  > > > >  thanks
>  > > > >  -Doug
>  > > > >  ______________________________________________________
>  > > > >  STSM  |  Web Services Architect  |  IBM Software Group
>  > > > >  (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
>  > > >
>  > > >
>  > > > --
>  > > > Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers
>  > > >
>  > > > ---------------------------------------------------------------------
>  > > > To unsubscribe, e-mail:  axis-dev-unsubscribe@ws.apache.org
>  > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
>  > > >
>  > > >
>  > >
>  > >
>  > > --
>  > > David Illsley - IBM Web Services Development
>  > >
>  > > ---------------------------------------------------------------------
>  > > To unsubscribe, e-mail:  axis-dev-unsubscribe@ws.apache.org
>  > > For additional commands, e-mail: axis-dev-help@ws.apache.org
>  > >
>  > >
>  > >
>  >
>  >
>
>
>
>  --
>  Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>



-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: accessing methods in a module

Posted by Doug Davis <du...@us.ibm.com>.
Just curious, do you have a URL to some docs that describe this 
ServiceTCCL option?
I googled it but only found references to Spring and I'm not using that.

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com



"Davanum Srinivas" <da...@gmail.com> 
02/15/2007 03:21 PM
Please respond to
axis-dev@ws.apache.org


To
axis-dev@ws.apache.org
cc

Subject
Re: accessing methods in a module






Doug,

Seconding Manoj's thoughts. Having a shared utility jar in WEB-INF/lib
and using those classes in both a mar and aar. Will that solve the
problem? Please raise a JIRA for that if that does not work with the
following parameter in your service.xml

<parameter name="ServiceTCCL" locked="false">composite</parameter>

thanks,
dims

PS: Please don't post html to the list. Please switch your email
client to send plain text.

On 2/15/07, Manoj Khangaonkar <kh...@gmail.com> wrote:
>
> Doug,
>
> Is this problem any different from any other code re-use problem with 
says EJB jars or WEB wars , Service aars ?
>
> In most of these cases - an "application" classloader with load the 
classes in the jar/war. So classes
> in 1 jar/war are not visible to others.
>
> Any utility classes that need to be shared - are first packaged as 
utility jars. But the utility jar needs to
> be copied and packaged with each EJB jar/WEB war that needs to use the 
utility classes.
>
> Mj
>
>
>
>
>
> On 2/15/07, Doug Davis <du...@us.ibm.com> wrote:
> >
> > I suspect that moving all utils (from all modules) into the kernel 
isn't an option  :-)
> >
> > thanks
> > -Doug
> > ______________________________________________________
> > STSM  |  Web Services Architect  |  IBM Software Group
> > (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
> >
> >
> >
> >  "David Illsley" <da...@gmail.com>
> >
> > 02/15/2007 03:49 AM
> >
> > Please respond to
> > axis-dev@ws.apache.org
> >
> >
> > To axis-dev@ws.apache.org,  dims@apache.org
> >
> > cc
> >
> >
> > Subject Re: accessing methods in a module
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi Doug,
> > The example you picked actually happened... did you know that? The
> > toOM/fromOM for EndpointReference are now in the kernel module so they
> > are available to everyone. The reason I did't push for services to be
> > able to access classes in mars is because it would still be a
> > development time headache to persuade my favoured IDE to look inside a
> > jar in a mar.
> >
> > David
> >
> > On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
> > > Doug,
> > >
> > > Come to think of it. i think If you place the mar file in 
WEB-INF/lib.
> > > The module is loaded and the code in there is available to services.
> > > Need to test it of course...
> > >
> > > -- dims
> > >
> > > On 2/14/07, Doug Davis < dug@us.ibm.com> wrote:
> > > >
> > > > If I have a module that exposes some static utility methods - what 
is the
> > > > way axis2 developers are supposed to model that?
> > > > For example, let's say a popular module like WS-Addressing were to 
expose
> > > > some utility method to convert a chunk of XML into an EPR. Clearly 
logic
> > > > that falls within the WS-Addressing module's domain but useful for 
more than
> > > > just the module itself.  Applications (on the client and/or 
server) may need
> > > > this kind of utility for their own purposes.  From my 
understanding, the
> > > > module classloading logic in axis2 is such that if I wanted to 
expose these
> > > > static methods I would need to duplicate the appropriate jar 
files.  In
> > > > other words, I need to copy the jars from the .mar file out into 
the normal
> > > > classloader path - e.g. WEB-INF/lib.  If correct, this seems less 
then
> > > > friendly since from the application's point of view, once the 
module is
> > > > engaged they may wonder why those classes are not available to be 
used - and
> > > > this would mean that module developers would need to package their 
code in
> > > > such a way that jars could easily be extracted for reuse outside 
of the
> > > > module w/o duplicating all jars (and they would need to 
communicate which
> > > > jars need to be copied in their docs).
> > > >
> > > >  thanks
> > > >  -Doug
> > > >  ______________________________________________________
> > > >  STSM  |  Web Services Architect  |  IBM Software Group
> > > >  (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
> > >
> > >
> > > --
> > > Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services 
Developers
> > >
> > > 
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:  axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > David Illsley - IBM Web Services Development
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:  axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
> >
>
>



-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org



Re: accessing methods in a module

Posted by Davanum Srinivas <da...@gmail.com>.
Doug,

Seconding Manoj's thoughts. Having a shared utility jar in WEB-INF/lib
and using those classes in both a mar and aar. Will that solve the
problem? Please raise a JIRA for that if that does not work with the
following parameter in your service.xml

<parameter name="ServiceTCCL" locked="false">composite</parameter>

thanks,
dims

PS: Please don't post html to the list. Please switch your email
client to send plain text.

On 2/15/07, Manoj Khangaonkar <kh...@gmail.com> wrote:
>
> Doug,
>
> Is this problem any different from any other code re-use problem with says EJB jars or WEB wars , Service aars ?
>
> In most of these cases - an "application" classloader with load the classes in the jar/war. So classes
> in 1 jar/war are not visible to others.
>
> Any utility classes that need to be shared - are first packaged as utility jars. But the utility jar needs to
> be copied and packaged with each EJB jar/WEB war that needs to use the utility classes.
>
> Mj
>
>
>
>
>
> On 2/15/07, Doug Davis <du...@us.ibm.com> wrote:
> >
> > I suspect that moving all utils (from all modules) into the kernel isn't an option  :-)
> >
> > thanks
> > -Doug
> > ______________________________________________________
> > STSM  |  Web Services Architect  |  IBM Software Group
> > (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
> >
> >
> >
> >  "David Illsley" <da...@gmail.com>
> >
> > 02/15/2007 03:49 AM
> >
> > Please respond to
> > axis-dev@ws.apache.org
> >
> >
> > To axis-dev@ws.apache.org,  dims@apache.org
> >
> > cc
> >
> >
> > Subject Re: accessing methods in a module
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi Doug,
> > The example you picked actually happened... did you know that? The
> > toOM/fromOM for EndpointReference are now in the kernel module so they
> > are available to everyone. The reason I did't push for services to be
> > able to access classes in mars is because it would still be a
> > development time headache to persuade my favoured IDE to look inside a
> > jar in a mar.
> >
> > David
> >
> > On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
> > > Doug,
> > >
> > > Come to think of it. i think If you place the mar file in WEB-INF/lib.
> > > The module is loaded and the code in there is available to services.
> > > Need to test it of course...
> > >
> > > -- dims
> > >
> > > On 2/14/07, Doug Davis < dug@us.ibm.com> wrote:
> > > >
> > > > If I have a module that exposes some static utility methods - what is the
> > > > way axis2 developers are supposed to model that?
> > > > For example, let's say a popular module like WS-Addressing were to expose
> > > > some utility method to convert a chunk of XML into an EPR.  Clearly logic
> > > > that falls within the WS-Addressing module's domain but useful for more than
> > > > just the module itself.  Applications (on the client and/or server) may need
> > > > this kind of utility for their own purposes.  From my understanding, the
> > > > module classloading logic in axis2 is such that if I wanted to expose these
> > > > static methods I would need to duplicate the appropriate jar files.  In
> > > > other words, I need to copy the jars from the .mar file out into the normal
> > > > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> > > > friendly since from the application's point of view, once the module is
> > > > engaged they may wonder why those classes are not available to be used - and
> > > > this would mean that module developers would need to package their code in
> > > > such a way that jars could easily be extracted for reuse outside of the
> > > > module w/o duplicating all jars (and they would need to communicate which
> > > > jars need to be copied in their docs).
> > > >
> > > >  thanks
> > > >  -Doug
> > > >  ______________________________________________________
> > > >  STSM  |  Web Services Architect  |  IBM Software Group
> > > >  (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
> > >
> > >
> > > --
> > > Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:  axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > David Illsley - IBM Web Services Development
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:  axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
> >
>
>



-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


RE: accessing methods in a module

Posted by Doug Davis <du...@us.ibm.com>.
Dunno - I guess it depends on the solution.  :-)
I can think of a way to make that work but to be honest I'm not sure being 
able to support two versions at the exact same time, on the same thread of 
execution, is really as important as ease of use of modules in general.

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com



"Sanjesh Pathak" <sa...@soapknox.com> 
02/15/2007 05:43 PM
Please respond to
axis-dev@ws.apache.org


To
<ax...@ws.apache.org>
cc

Subject
RE: accessing methods in a module






 
Will this still work if there are different versions of jars in different 
modules? That is, Module1 has myJar-1.0.jar and Module2 has myJar-1.1.jar?
 

From: Doug Davis [mailto:dug@us.ibm.com] 
Sent: Thursday, February 15, 2007 3:06 PM
To: axis-dev@ws.apache.org
Subject: Re: accessing methods in a module
 

  It could be but for some reason it feels different.  I have this image 
in my head that when I create a *.mar file its a self contained unit of 
functionality and people can move it around as needed.  Not unlike a *.jar 
file.  Its a collection of pieces needed for a particular piece of 
functionality. In this case the functionality is for 'axis' and the scope 
under which it works is 'axis'.  Now, I agree that perhaps the classes in 
a *.mar need to be scoped in some way - for example, perhaps not all 
modules are engaged for a particular invocation of a service, so in those 
situations I can understand why the classes in that module would be 
hidden.  However, in cases where the module is engaged shouldn't the 
classes within that module be visible?  IMO, the turning on of a module is 
akin to adding a jar file to your classpath. But I could be thinking about 
modules incorrectly. 
  I agree that I could create a shared utility jar but then if feels like 
I lose some of the benefits of having a *.mar in the first place. Having a 
single package that I can drop into my axis environment w/o having to also 
carry around secondary set of jar files to work around classloader issues 
just feels less than optimal - from a usability perspective. 

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com 


"Manoj Khangaonkar" <kh...@gmail.com> 
02/15/2007 02:43 PM 


Please respond to
axis-dev@ws.apache.org



To
axis-dev@ws.apache.org 
cc
 
Subject
Re: accessing methods in a module
 


 
 




Doug, 
 
Is this problem any different from any other code re-use problem with says 
EJB jars or WEB wars , Service aars ? 
 
In most of these cases - an "application" classloader with load the 
classes in the jar/war. So classes 
in 1 jar/war are not visible to others. 
 
Any utility classes that need to be shared - are first packaged as utility 
jars. But the utility jar needs to 
be copied and packaged with each EJB jar/WEB war that needs to use the 
utility classes. 
 
Mj 
 



On 2/15/07, Doug Davis <du...@us.ibm.com> wrote: 

I suspect that moving all utils (from all modules) into the kernel isn't 
an option  :-) 

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com 

"David Illsley" <da...@gmail.com> 
02/15/2007 03:49 AM 


Please respond to
axis-dev@ws.apache.org

 


To
axis-dev@ws.apache.org, dims@apache.org 
cc
 
Subject
Re: accessing methods in a module
 


 
 

 



Hi Doug,
The example you picked actually happened... did you know that? The
toOM/fromOM for EndpointReference are now in the kernel module so they 
are available to everyone. The reason I did't push for services to be
able to access classes in mars is because it would still be a
development time headache to persuade my favoured IDE to look inside a
jar in a mar. 

David

On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
> Doug,
>
> Come to think of it. i think If you place the mar file in WEB-INF/lib. 
> The module is loaded and the code in there is available to services.
> Need to test it of course...
>
> -- dims
>
> On 2/14/07, Doug Davis < dug@us.ibm.com> wrote:
> >
> > If I have a module that exposes some static utility methods - what is 
the
> > way axis2 developers are supposed to model that?
> > For example, let's say a popular module like WS-Addressing were to 
expose 
> > some utility method to convert a chunk of XML into an EPR.  Clearly 
logic
> > that falls within the WS-Addressing module's domain but useful for 
more than
> > just the module itself.  Applications (on the client and/or server) 
may need 
> > this kind of utility for their own purposes.  From my understanding, 
the
> > module classloading logic in axis2 is such that if I wanted to expose 
these
> > static methods I would need to duplicate the appropriate jar files. In 

> > other words, I need to copy the jars from the .mar file out into the 
normal
> > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> > friendly since from the application's point of view, once the module 
is 
> > engaged they may wonder why those classes are not available to be used 
- and
> > this would mean that module developers would need to package their 
code in
> > such a way that jars could easily be extracted for reuse outside of 
the 
> > module w/o duplicating all jars (and they would need to communicate 
which
> > jars need to be copied in their docs).
> >
> >  thanks
> >  -Doug
> >  ______________________________________________________ 
> >  STSM  |  Web Services Architect  |  IBM Software Group
> >  (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
>
>
> --
> Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services 
Developers 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org 
>
>


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org 



RE: accessing methods in a module

Posted by Sanjesh Pathak <sa...@soapknox.com>.
 
Will this still work if there are different versions of jars in different
modules? That is, Module1 has myJar-1.0.jar and Module2 has myJar-1.1.jar?
 
  _____  

From: Doug Davis [mailto:dug@us.ibm.com] 
Sent: Thursday, February 15, 2007 3:06 PM
To: axis-dev@ws.apache.org
Subject: Re: accessing methods in a module
 

  It could be but for some reason it feels different.  I have this image in
my head that when I create a *.mar file its a self contained unit of
functionality and people can move it around as needed.  Not unlike a *.jar
file.  Its a collection of pieces needed for a particular piece of
functionality. In this case the functionality is for 'axis' and the scope
under which it works is 'axis'.  Now, I agree that perhaps the classes in a
*.mar need to be scoped in some way - for example, perhaps not all modules
are engaged for a particular invocation of a service, so in those situations
I can understand why the classes in that module would be hidden.  However,
in cases where the module is engaged shouldn't the classes within that
module be visible?  IMO, the turning on of a module is akin to adding a jar
file to your classpath. But I could be thinking about modules incorrectly. 
  I agree that I could create a shared utility jar but then if feels like I
lose some of the benefits of having a *.mar in the first place. Having a
single package that I can drop into my axis environment w/o having to also
carry around secondary set of jar files to work around classloader issues
just feels less than optimal - from a usability perspective. 

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com 



"Manoj Khangaonkar" <kh...@gmail.com> 
02/15/2007 02:43 PM 

Please respond to
axis-dev@ws.apache.org

To
axis-dev@ws.apache.org 

cc
 

Subject
Re: accessing methods in a module
 

 
 



Doug, 
  
Is this problem any different from any other code re-use problem with says
EJB jars or WEB wars , Service aars ? 
  
In most of these cases - an "application" classloader with load the classes
in the jar/war. So classes 
in 1 jar/war are not visible to others. 
  
Any utility classes that need to be shared - are first packaged as utility
jars. But the utility jar needs to 
be copied and packaged with each EJB jar/WEB war that needs to use the
utility classes. 
  
Mj 
  



On 2/15/07, Doug Davis <du...@us.ibm.com> wrote: 

I suspect that moving all utils (from all modules) into the kernel isn't an
option  :-) 

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |    <ma...@us.ibm.com>
dug@us.ibm.com 

"David Illsley" < <ma...@gmail.com> davidillsley@gmail.com> 
02/15/2007 03:49 AM 

Please respond to
 <ma...@ws.apache.org> axis-dev@ws.apache.org
 

To
 <ma...@ws.apache.org> axis-dev@ws.apache.org,
<ma...@apache.org> dims@apache.org 

cc
 

Subject
Re: accessing methods in a module
 

 
 
 



Hi Doug,
The example you picked actually happened... did you know that? The
toOM/fromOM for EndpointReference are now in the kernel module so they 
are available to everyone. The reason I did't push for services to be
able to access classes in mars is because it would still be a
development time headache to persuade my favoured IDE to look inside a
jar in a mar. 

David

On 14/02/07, Davanum Srinivas < <ma...@gmail.com>
davanum@gmail.com> wrote:
> Doug,
>
> Come to think of it. i think If you place the mar file in WEB-INF/lib. 
> The module is loaded and the code in there is available to services.
> Need to test it of course...
>
> -- dims
>
> On 2/14/07, Doug Davis < <ma...@us.ibm.com>  dug@us.ibm.com> wrote:
> >
> > If I have a module that exposes some static utility methods - what is
the
> > way axis2 developers are supposed to model that?
> > For example, let's say a popular module like WS-Addressing were to
expose 
> > some utility method to convert a chunk of XML into an EPR.  Clearly
logic
> > that falls within the WS-Addressing module's domain but useful for more
than
> > just the module itself.  Applications (on the client and/or server) may
need 
> > this kind of utility for their own purposes.  From my understanding, the
> > module classloading logic in axis2 is such that if I wanted to expose
these
> > static methods I would need to duplicate the appropriate jar files.  In 
> > other words, I need to copy the jars from the .mar file out into the
normal
> > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> > friendly since from the application's point of view, once the module is 
> > engaged they may wonder why those classes are not available to be used -
and
> > this would mean that module developers would need to package their code
in
> > such a way that jars could easily be extracted for reuse outside of the 
> > module w/o duplicating all jars (and they would need to communicate
which
> > jars need to be copied in their docs).
> >
> >  thanks
> >  -Doug
> >  ______________________________________________________ 
> >  STSM  |  Web Services Architect  |  IBM Software Group
> >  (919) 254-6905  |  IBM T/L 444-6905  |   <ma...@us.ibm.com>
dug@us.ibm.com
>
>
> --
> Davanum Srinivas ::  <http://wso2.org/> http://wso2.org/ :: Oxygen for Web
Services Developers 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:  <ma...@ws.apache.org>
axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail:  <ma...@ws.apache.org>
axis-dev-help@ws.apache.org 
>
>


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail:  <ma...@ws.apache.org>
axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail:  <ma...@ws.apache.org>
axis-dev-help@ws.apache.org 




Re: accessing methods in a module

Posted by Doug Davis <du...@us.ibm.com>.
  It could be but for some reason it feels different.  I have this image 
in my head that when I create a *.mar file its a self contained unit of 
functionality and people can move it around as needed.  Not unlike a *.jar 
file.  Its a collection of pieces needed for a particular piece of 
functionality. In this case the functionality is for 'axis' and the scope 
under which it works is 'axis'.  Now, I agree that perhaps the classes in 
a *.mar need to be scoped in some way - for example, perhaps not all 
modules are engaged for a particular invocation of a service, so in those 
situations I can understand why the classes in that module would be 
hidden.  However, in cases where the module is engaged shouldn't the 
classes within that module be visible?  IMO, the turning on of a module is 
akin to adding a jar file to your classpath. But I could be thinking about 
modules incorrectly.
  I agree that I could create a shared utility jar but then if feels like 
I lose some of the benefits of having a *.mar in the first place. Having a 
single package that I can drop into my axis environment w/o having to also 
carry around secondary set of jar files to work around classloader issues 
just feels less than optimal - from a usability perspective.

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com



"Manoj Khangaonkar" <kh...@gmail.com> 
02/15/2007 02:43 PM
Please respond to
axis-dev@ws.apache.org


To
axis-dev@ws.apache.org
cc

Subject
Re: accessing methods in a module






Doug,
 
Is this problem any different from any other code re-use problem with says 
EJB jars or WEB wars , Service aars ?
 
In most of these cases - an "application" classloader with load the 
classes in the jar/war. So classes
in 1 jar/war are not visible to others. 
 
Any utility classes that need to be shared - are first packaged as utility 
jars. But the utility jar needs to 
be copied and packaged with each EJB jar/WEB war that needs to use the 
utility classes.
 
Mj 
 


 
On 2/15/07, Doug Davis <du...@us.ibm.com> wrote: 

I suspect that moving all utils (from all modules) into the kernel isn't 
an option  :-) 

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com 


"David Illsley" <da...@gmail.com> 
02/15/2007 03:49 AM 

Please respond to
axis-dev@ws.apache.org



To
axis-dev@ws.apache.org, dims@apache.org 
cc

Subject
Re: accessing methods in a module









Hi Doug,
The example you picked actually happened... did you know that? The
toOM/fromOM for EndpointReference are now in the kernel module so they 
are available to everyone. The reason I did't push for services to be
able to access classes in mars is because it would still be a
development time headache to persuade my favoured IDE to look inside a
jar in a mar. 

David

On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
> Doug,
>
> Come to think of it. i think If you place the mar file in WEB-INF/lib. 
> The module is loaded and the code in there is available to services.
> Need to test it of course...
>
> -- dims
>
> On 2/14/07, Doug Davis < dug@us.ibm.com> wrote:
> >
> > If I have a module that exposes some static utility methods - what is 
the
> > way axis2 developers are supposed to model that?
> > For example, let's say a popular module like WS-Addressing were to 
expose 
> > some utility method to convert a chunk of XML into an EPR.  Clearly 
logic
> > that falls within the WS-Addressing module's domain but useful for 
more than
> > just the module itself.  Applications (on the client and/or server) 
may need 
> > this kind of utility for their own purposes.  From my understanding, 
the
> > module classloading logic in axis2 is such that if I wanted to expose 
these
> > static methods I would need to duplicate the appropriate jar files. In 

> > other words, I need to copy the jars from the .mar file out into the 
normal
> > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> > friendly since from the application's point of view, once the module 
is 
> > engaged they may wonder why those classes are not available to be used 
- and
> > this would mean that module developers would need to package their 
code in
> > such a way that jars could easily be extracted for reuse outside of 
the 
> > module w/o duplicating all jars (and they would need to communicate 
which
> > jars need to be copied in their docs).
> >
> >  thanks
> >  -Doug
> >  ______________________________________________________ 
> >  STSM  |  Web Services Architect  |  IBM Software Group
> >  (919) 254-6905  |  IBM T/L 444-6905  |   dug@us.ibm.com
>
>
> --
> Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services 
Developers 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org 
>
>


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org 




Re: accessing methods in a module

Posted by Manoj Khangaonkar <kh...@gmail.com>.
Doug,

Is this problem any different from any other code re-use problem with says
EJB jars or WEB wars , Service aars ?

In most of these cases - an "application" classloader with load the classes
in the jar/war. So classes
in 1 jar/war are not visible to others.

Any utility classes that need to be shared - are first packaged as utility
jars. But the utility jar needs to
be copied and packaged with each EJB jar/WEB war that needs to use the
utility classes.

Mj




On 2/15/07, Doug Davis <du...@us.ibm.com> wrote:
>
>
> I suspect that moving all utils (from all modules) into the kernel isn't
> an option  :-)
>
> thanks
> -Doug
> ______________________________________________________
> STSM  |  Web Services Architect  |  IBM Software Group
> (919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com
>
>
>   *"David Illsley" <da...@gmail.com>*
>
> 02/15/2007 03:49 AM   Please respond to
> axis-dev@ws.apache.org
>
>    To
> axis-dev@ws.apache.org, dims@apache.org  cc
>   Subject
> Re: accessing methods in a module
>
>
>
>
> Hi Doug,
> The example you picked actually happened... did you know that? The
> toOM/fromOM for EndpointReference are now in the kernel module so they
> are available to everyone. The reason I did't push for services to be
> able to access classes in mars is because it would still be a
> development time headache to persuade my favoured IDE to look inside a
> jar in a mar.
>
> David
>
> On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
> > Doug,
> >
> > Come to think of it. i think If you place the mar file in WEB-INF/lib.
> > The module is loaded and the code in there is available to services.
> > Need to test it of course...
> >
> > -- dims
> >
> > On 2/14/07, Doug Davis <du...@us.ibm.com> wrote:
> > >
> > > If I have a module that exposes some static utility methods - what is
> the
> > > way axis2 developers are supposed to model that?
> > > For example, let's say a popular module like WS-Addressing were to
> expose
> > > some utility method to convert a chunk of XML into an EPR.  Clearly
> logic
> > > that falls within the WS-Addressing module's domain but useful for
> more than
> > > just the module itself.  Applications (on the client and/or server)
> may need
> > > this kind of utility for their own purposes.  From my understanding,
> the
> > > module classloading logic in axis2 is such that if I wanted to expose
> these
> > > static methods I would need to duplicate the appropriate jar files.
>  In
> > > other words, I need to copy the jars from the .mar file out into the
> normal
> > > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> > > friendly since from the application's point of view, once the module
> is
> > > engaged they may wonder why those classes are not available to be used
> - and
> > > this would mean that module developers would need to package their
> code in
> > > such a way that jars could easily be extracted for reuse outside of
> the
> > > module w/o duplicating all jars (and they would need to communicate
> which
> > > jars need to be copied in their docs).
> > >
> > >  thanks
> > >  -Doug
> > >  ______________________________________________________
> > >  STSM  |  Web Services Architect  |  IBM Software Group
> > >  (919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com
> >
> >
> > --
> > Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services
> Developers
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
> --
> David Illsley - IBM Web Services Development
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>

Re: accessing methods in a module

Posted by Doug Davis <du...@us.ibm.com>.
I suspect that moving all utils (from all modules) into the kernel isn't 
an option  :-)

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com



"David Illsley" <da...@gmail.com> 
02/15/2007 03:49 AM
Please respond to
axis-dev@ws.apache.org


To
axis-dev@ws.apache.org, dims@apache.org
cc

Subject
Re: accessing methods in a module






Hi Doug,
The example you picked actually happened... did you know that? The
toOM/fromOM for EndpointReference are now in the kernel module so they
are available to everyone. The reason I did't push for services to be
able to access classes in mars is because it would still be a
development time headache to persuade my favoured IDE to look inside a
jar in a mar.

David

On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
> Doug,
>
> Come to think of it. i think If you place the mar file in WEB-INF/lib.
> The module is loaded and the code in there is available to services.
> Need to test it of course...
>
> -- dims
>
> On 2/14/07, Doug Davis <du...@us.ibm.com> wrote:
> >
> > If I have a module that exposes some static utility methods - what is 
the
> > way axis2 developers are supposed to model that?
> > For example, let's say a popular module like WS-Addressing were to 
expose
> > some utility method to convert a chunk of XML into an EPR.  Clearly 
logic
> > that falls within the WS-Addressing module's domain but useful for 
more than
> > just the module itself.  Applications (on the client and/or server) 
may need
> > this kind of utility for their own purposes.  From my understanding, 
the
> > module classloading logic in axis2 is such that if I wanted to expose 
these
> > static methods I would need to duplicate the appropriate jar files. In
> > other words, I need to copy the jars from the .mar file out into the 
normal
> > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> > friendly since from the application's point of view, once the module 
is
> > engaged they may wonder why those classes are not available to be used 
- and
> > this would mean that module developers would need to package their 
code in
> > such a way that jars could easily be extracted for reuse outside of 
the
> > module w/o duplicating all jars (and they would need to communicate 
which
> > jars need to be copied in their docs).
> >
> >  thanks
> >  -Doug
> >  ______________________________________________________
> >  STSM  |  Web Services Architect  |  IBM Software Group
> >  (919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com
>
>
> --
> Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services 
Developers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org



Re: accessing methods in a module

Posted by David Illsley <da...@gmail.com>.
Hi Doug,
The example you picked actually happened... did you know that? The
toOM/fromOM for EndpointReference are now in the kernel module so they
are available to everyone. The reason I did't push for services to be
able to access classes in mars is because it would still be a
development time headache to persuade my favoured IDE to look inside a
jar in a mar.

David

On 14/02/07, Davanum Srinivas <da...@gmail.com> wrote:
> Doug,
>
> Come to think of it. i think If you place the mar file in WEB-INF/lib.
> The module is loaded and the code in there is available to services.
> Need to test it of course...
>
> -- dims
>
> On 2/14/07, Doug Davis <du...@us.ibm.com> wrote:
> >
> > If I have a module that exposes some static utility methods - what is the
> > way axis2 developers are supposed to model that?
> > For example, let's say a popular module like WS-Addressing were to expose
> > some utility method to convert a chunk of XML into an EPR.  Clearly logic
> > that falls within the WS-Addressing module's domain but useful for more than
> > just the module itself.  Applications (on the client and/or server) may need
> > this kind of utility for their own purposes.  From my understanding, the
> > module classloading logic in axis2 is such that if I wanted to expose these
> > static methods I would need to duplicate the appropriate jar files.  In
> > other words, I need to copy the jars from the .mar file out into the normal
> > classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> > friendly since from the application's point of view, once the module is
> > engaged they may wonder why those classes are not available to be used - and
> > this would mean that module developers would need to package their code in
> > such a way that jars could easily be extracted for reuse outside of the
> > module w/o duplicating all jars (and they would need to communicate which
> > jars need to be copied in their docs).
> >
> >  thanks
> >  -Doug
> >  ______________________________________________________
> >  STSM  |  Web Services Architect  |  IBM Software Group
> >  (919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com
>
>
> --
> Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: accessing methods in a module

Posted by Doug Davis <du...@us.ibm.com>.
Dims,
  unless our tests were run wrong it appears the only way it works is to 
have two files - foo.mar and foo.jar both available.  The foo.jar needs to 
be under the WEB-INF/lib dir, but the foo.mar can be in either WEB-INF/lib 
or WEB-INF/modules. Leads me to two questions:
1 - is this the right design?  Doesn't seem the most user friendly.
2 - if the .mar file can be in either place, is there any point to having 
the modules dir?

thanks
-Doug
______________________________________________________
STSM  |  Web Services Architect  |  IBM Software Group
(919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com



"Davanum Srinivas" <da...@gmail.com> 
02/14/2007 06:50 PM
Please respond to
axis-dev@ws.apache.org


To
axis-dev@ws.apache.org
cc

Subject
Re: accessing methods in a module






Doug,

Come to think of it. i think If you place the mar file in WEB-INF/lib.
The module is loaded and the code in there is available to services.
Need to test it of course...

-- dims

On 2/14/07, Doug Davis <du...@us.ibm.com> wrote:
>
> If I have a module that exposes some static utility methods - what is 
the
> way axis2 developers are supposed to model that?
> For example, let's say a popular module like WS-Addressing were to 
expose
> some utility method to convert a chunk of XML into an EPR.  Clearly 
logic
> that falls within the WS-Addressing module's domain but useful for more 
than
> just the module itself.  Applications (on the client and/or server) may 
need
> this kind of utility for their own purposes.  From my understanding, the
> module classloading logic in axis2 is such that if I wanted to expose 
these
> static methods I would need to duplicate the appropriate jar files.  In
> other words, I need to copy the jars from the .mar file out into the 
normal
> classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> friendly since from the application's point of view, once the module is
> engaged they may wonder why those classes are not available to be used - 
and
> this would mean that module developers would need to package their code 
in
> such a way that jars could easily be extracted for reuse outside of the
> module w/o duplicating all jars (and they would need to communicate 
which
> jars need to be copied in their docs).
>
>  thanks
>  -Doug
>  ______________________________________________________
>  STSM  |  Web Services Architect  |  IBM Software Group
>  (919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org



Re: accessing methods in a module

Posted by Davanum Srinivas <da...@gmail.com>.
Doug,

Come to think of it. i think If you place the mar file in WEB-INF/lib.
The module is loaded and the code in there is available to services.
Need to test it of course...

-- dims

On 2/14/07, Doug Davis <du...@us.ibm.com> wrote:
>
> If I have a module that exposes some static utility methods - what is the
> way axis2 developers are supposed to model that?
> For example, let's say a popular module like WS-Addressing were to expose
> some utility method to convert a chunk of XML into an EPR.  Clearly logic
> that falls within the WS-Addressing module's domain but useful for more than
> just the module itself.  Applications (on the client and/or server) may need
> this kind of utility for their own purposes.  From my understanding, the
> module classloading logic in axis2 is such that if I wanted to expose these
> static methods I would need to duplicate the appropriate jar files.  In
> other words, I need to copy the jars from the .mar file out into the normal
> classloader path - e.g. WEB-INF/lib.  If correct, this seems less then
> friendly since from the application's point of view, once the module is
> engaged they may wonder why those classes are not available to be used - and
> this would mean that module developers would need to package their code in
> such a way that jars could easily be extracted for reuse outside of the
> module w/o duplicating all jars (and they would need to communicate which
> jars need to be copied in their docs).
>
>  thanks
>  -Doug
>  ______________________________________________________
>  STSM  |  Web Services Architect  |  IBM Software Group
>  (919) 254-6905  |  IBM T/L 444-6905  |  dug@us.ibm.com


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org