axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiva Weerawarana <sanj...@opensource.lk>
Subject RE: [axis2]a little frustrated
Date Fri, 08 Dec 2006 09:46:59 GMT
Sorry its frustrating you Tony but the lifecycle change had to be done
to make it consistent. The problem of course is that service
init/destroy and service implementation class lifecyles may be different
depending on the scope of the service. If the scope is session then the
service impl class will get new'ed up multiple times, one per session.
So the lifecycle stuff can't be in that class- it needs to be elsewhere
an we decided to create a separate class. This was discussed on this
list.

Not sure what's wrong with the other issue- Deepal??

Sanjiva.

On Thu, 2006-12-07 at 09:42 -0500, Tony Dean wrote:
> Some more information...
> 
> When my startUp method is called AxisService.getFileName() returns
>  null.
> 
> When my init method is called
>  ServiceContext.getAxisService().getFileName() contains the correct
>  information.
> 
> Just looks like AxisService is not fully populated with information
>  until the session context is created.  Can you explain?
> 
> In my case (scope=application), it appears that I can just put all my
>  one-time initialization in init() since I will only be creating one
>  session.  It also appears that init() is called during Axis2
>  deployment.  I want to get all the initialization done before the
>  first request comes in.  Is this correct?
> 
> However, this would not work if I needed session management.  In that
>  case I would need to put one-time initialization back in startUp.
> 
> Thanks.
> 
> -----Original Message-----
> From: Tony Dean [mailto:Tony.Dean@sas.com] 
> Sent: Wednesday, December 06, 2006 5:52 PM
> To: axis-dev@ws.apache.org
> Subject: [axis2]a little fustrated
> 
> Hi,
> 
> I have put down Axis2 1.1 and have found that some things have changed that I relied
on.
> 
> AxisService.getFileName use to return a URL to the service.  I was able to acquire resources
from my aar or exploded directory bundled with my service.  This method call now returns null.
 Why?
> 
> When you make changes moving forward, you have to ensure backward capability.  Or at
least document a valid reason for such change.
> 
> How do I proceed now in order to get the same functionality?
> 
> ServiceLifeCycle:
> It seems the life cycle changes you have put into 1.1 that you have to specify an additional
class that contains the startUp/shutDown methods.  I just want one service class that performs
startUp, shutDown, init, destroy, and business logic.  The startUp method creates information
that must be shared with the init, and business logic methods.  I'm not sure if I have the
lifecycle class == service class if I get one or two instances of my class.  If I get one
instance then I can share information with worrying about additional calloboration.  If I
get two instances I will have to do what you do in your lifecycle example.  That is create
parameters and stuff them in axis service so that the real service code can access it.  For
application scope I hope that I only get one instance of my class even if the lifecycle and
service class are the same.  Is this the case?
> 
> Thanks.
> 
> Tony Dean
> SAS Institute Inc.
> 919.531.6704
> tony.dean@sas.com
> 
> SAS... The Power to Know
> http://www.sas.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
> 
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/


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


Mime
View raw message