Ok, that seemed to work for all calls to the webservice methods. Every
call to the web service method went to the same object. But when I did a
System.out.println(this) during the startUp(), it was a different
pointer than the application scope service. Is this right?
Roshan Punnoose
Phone: 301-497-6039
-----Original Message-----
From: robert lazarski [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 4:50 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] Spring Integration
You can try using application scope.
Robert
On 9/20/06, Punnoose, Roshan <[EMAIL PROTECTED]> wrote:
> Ok, that's not hard. I just did a System.out.println(this) in the
> webservice, and it shows that there are different object created for
> each call to the service. Is there a way I can stop this from
happening?
>
> Roshan Punnoose
> Phone: 301-497-6039
>
> -----Original Message-----
> From: robert lazarski [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 20, 2006 4:07 PM
> To: axis-user@ws.apache.org
> Subject: Re: [Axis2] Spring Integration
>
> A non-Spring field that is an instance variable? I've of course tested
> the spring instance variables but have not tried setting a traditional
> instance variable via startUp() . You could help us by filing a jira
> with a test case ... but it'd be better if you removed all the spring
> stuff so it doesn't distract from the lifecycle issue.
>
> Robert
>
> On 9/20/06, Punnoose, Roshan <[EMAIL PROTECTED]> wrote:
> > Sorry to keep this going for so long...
> >
> > But the other thing I noticed was that if I set a field in my
service
> > during the startup, that field will not be the same when I am
actually
> > running the service. It looks like there are different instances of
my
> > service being created, I had to turn the field into a static field
to
> > make it work. Any ideas why?
> >
> > Roshan Punnoose
> > Phone: 301-497-6039
> >
> > -----Original Message-----
> > From: Punnoose, Roshan [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 20, 2006 3:41 PM
> > To: axis-user@ws.apache.org
> > Subject: RE: [Axis2] Spring Integration
> >
> > The reason I did that was because I wanted to use the
> > SingletonBeanFactoryLocator and it uses the TCCL underneath to
> > instantiate the beans. I reason I am using the BeanFactoryLocator is
> > because I have different bean factories depending on which
deployment
> I
> > am using, and I have it all configured to use the
> > SingletonBeanFactoryLocator now.
> >
> > I'm testing this right now, and it "seems" to work. Will keep
testing
> > though, bound to be something I didn't think of.
> >
> > Roshan Punnoose
> > Phone: 301-497-6039
> >
> > -----Original Message-----
> > From: robert lazarski [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 20, 2006 3:24 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: [Axis2] Spring Integration
> >
> > Anything to do with loading resources inside the aar AFAIK should
use
> > the service classloader . You've already set Spring to use the
service
> > classloader, and your spring beans should be instatiated via that
> > classloader as well. I'm not aware of any valid case of using the
TCCL
> > inside an aar , though somebody might correct me on that.
> >
> > HTH,
> > Robert
> >
> > On 9/20/06, Punnoose, Roshan <[EMAIL PROTECTED]> wrote:
> > > Is it a bad idea to change the currentThread.contextClassLoader to
> the
> > > service.getClassLoader()? Would I have to change it back once I am
> > done
> > > instantiating the beans?
> > >
> > > Roshan Punnoose
> > > Phone: 301-497-6039
> > >
> > > -----Original Message-----
> > > From: robert lazarski [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, September 20, 2006 2:08 PM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: [Axis2] Spring Integration
> > >
> > > Does this help? If it does, let me know how the code turned out
and
> I
> > > may add it to the docs.
> > >
> > > http://www.wso2.net/kb/98
> > >
> > > Robert
> > >
> > > On 9/20/06, Punnoose, Roshan <[EMAIL PROTECTED]> wrote:
> > > > Thanks, that seemed to work well.
> > > >
> > > > Now that I have that simple case working :), I am trying to do
> > > something
> > > > a little harder. I want to load all the beanRefFactory.xml on
the
> > > > classpath, this includes the one in the aar root dir, but also
all
> > of
> > > > the ones in the aar/lib jar files. I used to do this by doing:
> > > > SingletonBeanFactoryLocator.getInstance(), which picked up all
> > > > reasources: classpath*:beanRefFactory.xml. Is there a way to do
> this
> > > > properly in the aar?
> > > >
> > > > Roshan Punnoose
> > > > Phone: 301-497-6039
> > > >
> > > > -----Original Message-----
> > > > From: robert lazarski [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, September 20, 2006 12:59 PM
> > > > To: axis-user@ws.apache.org
> > > > Subject: Re: [Axis2] Spring Integration
> > > >
> > > > Don't use the TCCL via Thread.currentThread() . Use the Axis
> Service
> > > > classloader as explained in the docs. After that, if you have
> > problems
> > > > post your entire stacktrace please , and print out the structure
> of
> > > > your aar .
> > > >
> > > > HTH,
> > > > Robert
> > > >
> > > > On 9/20/06, Punnoose, Roshan <[EMAIL PROTECTED]> wrote:
> > > > > Thanks for updating the docs so quickly.
> > > > >
> > > > > I am having trouble getting axis to resolve to my
> > > beanRefFactory.xml.
> > > > > The xml file is in the root level of the aar. Here is the
code:
> > > > >
> > > > > new
> > > > >
> > >
> org.springframework.context.support.ClassPathXmlApplicationContext(new
> > > > > String[] {
> > > > > "beanRefFactory.xml"}, false);
> > > > >
> > > > >
> > ctx.setClassLoader(Thread.currentThread().getContextClassLoader());
> > > > > ctx.refresh();
> > > > >
> > > > > Do I need to create a path to the beanRefFactory.xml itself?
> > > > >
> > > > > Roshan Punnoose
> > > > > Phone: 301-497-6039
> > > > >
> > > > > -----Original Message-----
> > > > > From: robert lazarski [mailto:[EMAIL PROTECTED]
> > > > > Sent: Wednesday, September 20, 2006 12:35 PM
> > > > > To: axis-user@ws.apache.org
> > > > > Subject: Re: [Axis2] Spring Integration
> > > > >
> > > > > The docs are now updated:
> > > > >
> > > > >
> > > >
> > >
> >
>
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/xdocs/1_1/s
> > > > > pring.html
> > > > >
> > > > > If you still have a problem let us know.
> > > > >
> > > > > HTH,
> > > > > Robert
> > > > >
> > > > > On 9/20/06, Punnoose, Roshan <[EMAIL PROTECTED]>
wrote:
> > > > > > In my startup, I am using the SingletonBeanFactoryLocator to
> > find
> > > my
> > > > > > beanRefFactory.xml. I send it classpath*:beanRefFactory.xml
to
> > the
> > > > > > factory Locator and my beanRefFactory.xml is in the root
level
> > of
> > > my
> > > > > > aar, is this right? It looks like it cannot find the xml
file,
> > > maybe
> > > > > > because the root level of the aar is not part of the
> classpath?
> > > > > >
> > > > > > Roshan Punnoose
> > > > > > Phone: 301-497-6039
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: robert lazarski [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Friday, September 15, 2006 9:57 AM
> > > > > > To: axis-user@ws.apache.org
> > > > > > Subject: Re: [Axis2] Spring Integration
> > > > > >
> > > > > > Nope ... startUp() happens only once , similair to the way
> > > > > > load-on-startUp works for a servlet.
> > > > > >
> > > > > > However, the dev list today started a thread on refactoring
> the
> > > > > > Service interface ... moving some of the methods to another
> > > > interface.
> > > > > > So you can use it the way I descibed now ... but its going
to
> > > likely
> > > > > > change here shortly . It should stabalize soon as we have a
> > > release
> > > > > > comming up.
> > > > > >
> > > > > > Robert
> > > > > >
> > > > > > On 9/15/06, Punnoose, Roshan <[EMAIL PROTECTED]>
> wrote:
> > > > > > > Doesn't Axis create a new service with each request? So if
I
> > put
> > > > the
> > > > > > > spring init inside the Service.startUp(), then it will
> happen
> > > with
> > > > > > each
> > > > > > > request right?
> > > > > > >
> > > > > > > Roshan Punnoose
> > > > > > > Phone: 301-497-6039
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: robert lazarski [mailto:[EMAIL PROTECTED]
> > > > > > > Sent: Friday, September 15, 2006 12:49 AM
> > > > > > > To: axis-user@ws.apache.org
> > > > > > > Subject: Re: [Axis2] Spring Integration
> > > > > > >
> > > > > > > Late here ... just remembered that will only work with
> > > > > > > SpringAppContextAwareObjectSupplier so you'll to init
spring
> > > > > yourself.
> > > > > > > Hint: Service.startUp() . Will try to doc this asap .
> > > > > > >
> > > > > > > Robert
> > > > > > >
> > > > > > > On 9/15/06, robert lazarski <[EMAIL PROTECTED]>
> wrote:
> > > > > > > > The structure is like so:
> > > > > > > >
> > > > > > > > aar
> > > > > > > > applicationContext.xml
> > > > > > > > lib
> > > > > > > > spring.jar
> > > > > > > > axis2-spring*.jar
> > > > > > > >
> > > > > > > > Robert
> > > > > > > >
> > > > > > > >
> > > > > > > > On 9/14/06, Punnoose, Roshan <[EMAIL PROTECTED]>
> > > wrote:
> > > > > > > > > It looks good, do you have an example, it doesn't have
> to
> > be
> > > > > > written
> > > > > > > up,
> > > > > > > > > for putting spring in the aar file. (Would this mean
> that
> > > the
> > > > > > > > > applicationContext.xml would be inside the aar file?)
> > > > > > > > >
> > > > > > > > > Roshan Punnoose
> > > > > > > > > Phone: 301-497-6039
> > > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: robert lazarski
[mailto:[EMAIL PROTECTED]
> > > > > > > > > Sent: Thursday, September 14, 2006 12:17 PM
> > > > > > > > > To: axis-user@ws.apache.org
> > > > > > > > > Subject: Re: [Axis2] Spring Integration
> > > > > > > > >
> > > > > > > > > The docs are here:
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/xdocs/lates
> > > > > > > > > t/spring.html
> > > > > > > > >
> > > > > > > > > There is one additional new feature I hope to document
> > this
> > > > > > weekend:
> > > > > > > > > The ability to put spring into an aar .
> > > > > > > > >
> > > > > > > > > Anyways, all current MR's extend
AbstractMessageReceiver
> -
> > > > where
> > > > > > the
> > > > > > > > > hook is - so any which one will work.
> > > > > > > > >
> > > > > > > > > Robert
> > > > > > > > >
> > > > > > > > > On 9/14/06, Punnoose, Roshan
<[EMAIL PROTECTED]>
> > > > wrote:
> > > > > > > > > > I saw that in the latest code base, there is a
spring
> > > > module.
> > > > > > How
> > > > > > > do I
> > > > > > > > > > use those suppliers provided? Looking at the code,
it
> > > seems
> > > > > like
> > > > > > I
> > > > > > > > > have
> > > > > > > > > > to set the SpringBeanName in the services.xml, does
> that
> > > > mean
> > > > > I
> > > > > > > have
> > > > > > > > > to
> > > > > > > > > > use a different receiver? And then, do I have to
> > configure
> > > > the
> > > > > > > Spring
> > > > > > > > > > servlet on the web.xml?
> > > > > > > > > >
> > > > > > > > > > Roshan Punnoose
> > > > > > > > > > Phone: 301-497-6039
> > > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Punnoose, Roshan
> > [mailto:[EMAIL PROTECTED]
> > > > > > > > > > Sent: Thursday, September 14, 2006 9:01 AM
> > > > > > > > > > To: axis-user@ws.apache.org
> > > > > > > > > > Subject: RE: [Axis2] NonBlocking Client
> > > > > > > > > >
> > > > > > > > > > Thanks, that makes sense.
> > > > > > > > > >
> > > > > > > > > > On the server side, if I have the address that came
> over
> > > > from
> > > > > > the
> > > > > > > > > > wsa:ReplyTo, and I want to push a message out to it,
> do
> > I
> > > > have
> > > > > > to
> > > > > > > > > create
> > > > > > > > > > an axis client on the server side with the target
EPR
> > > being
> > > > > the
> > > > > > > > > > wsa:ReplyTo from before? Is that the easiest way to
do
> > it?
> > > > > > > > > >
> > > > > > > > > > Roshan Punnoose
> > > > > > > > > > Phone: 301-497-6039
> > > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Michele Mazzucco
> > [mailto:[EMAIL PROTECTED]
> > > > > > > > > > Sent: Thursday, September 14, 2006 4:21 AM
> > > > > > > > > > To: axis-user@ws.apache.org
> > > > > > > > > > Subject: Re: [Axis2] NonBlocking Client
> > > > > > > > > >
> > > > > > > > > > Hi Roshan,
> > > > > > > > > >
> > > > > > > > > > you have to override the methods of the Callback
class
> > > > > > > (isComplete()
> > > > > > > > > and
> > > > > > > > > > setComplete()).
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Regards,
> > > > > > > > > > Michele
> > > > > > > > > >
> > > > > > > > > > Punnoose, Roshan wrote:
> > > > > > > > > > > Hi,
> > > > > > > > > > >
> > > > > > > > > > > I have a non-blocking client with the callback on
a
> > > > separate
> > > > > > > > > listener.
> > > > > > > > > > > Is there anyway that I can keep that callback open
> > even
> > > > > after
> > > > > > > the
> > > > > > > > > > > response, while the server will be able to send
more
> > > > > responses
> > > > > > > back
> > > > > > > > > to
> > > > > > > > > > > the same callback? Then close it on the client
side
> > > after
> > > > I
> > > > > > > receive
> > > > > > > > > > what
> > > > > > > > > > > I want from the server?
> > > > > > > > > > >
> > > > > > > > > > > Roshan Punnoose
> > > > > > > > > > > Phone: 301-497-6039
> > > > > > > > > > >
> > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > From: Neil Aggarwal
[mailto:[EMAIL PROTECTED]
> > > > > > > > > > > Sent: Wednesday, September 13, 2006 5:43 PM
> > > > > > > > > > > To: axis-user@ws.apache.org
> > > > > > > > > > > Subject: Axis using more than 256MB for a 9MB file
> > > > > > > > > > >
> > > > > > > > > > > Hello:
> > > > > > > > > > >
> > > > > > > > > > > I have a web service deployed using Axis 1.4
> > > > > > > > > > >
> > > > > > > > > > > In that service, I have a method that accepts a
> > > > > > > > > > > String containing an XML document.
> > > > > > > > > > >
> > > > > > > > > > > When I try to upload a 9MB XML file into my
service,
> > > > > > > > > > > Axis seems to be taking up a HUGE amount of
memory.
> > > > > > > > > > >
> > > > > > > > > > > If I set the JVM to 256MB of heap, it runs out of
> > > > > > > > > > > memory and throws an OutOfMemoryException.
> > > > > > > > > > >
> > > > > > > > > > > If I set the JVM to 512MB of heap, I get the file
> > > > > > > > > > > just fine.
> > > > > > > > > > >
> > > > > > > > > > > The problem occurs *before* my web service method
> > > > > > > > > > > is even invoked.
> > > > > > > > > > >
> > > > > > > > > > > The service is running on Tomcat on Windows.
> > > > > > > > > > >
> > > > > > > > > > > Any ideas why Axis would consume so much memory?
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > > Neil
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Neil Aggarwal, (214)986-3533,
www.JAMMConsulting.com
> > > > > > > > > > > FREE! Eliminate junk email and reclaim your inbox.
> > > > > > > > > > > Visit http://www.spammilter.com for details.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > > > > > > > > For additional commands, e-mail:
> > > > > [EMAIL PROTECTED]
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > > > > > > > > For additional commands, e-mail:
> > > > > [EMAIL PROTECTED]
> > > > > > > > > >
> > > > > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > > > > > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > > > > > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > > > > > > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > > > > > > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
[EMAIL PROTECTED]
> > > > > > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
[EMAIL PROTECTED]
> > > > > > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]