I sure am using the Axis2 Service classloader.
It still over writes.
Matt
--- robert lazarski <[EMAIL PROTECTED]> wrote:
> Your startUp() code has to use the Axis2 Service
> classloader:
>
> public void startUp(ConfigurationContext ignore,
> AxisService service) {
>
> try {
> System.out.println("Starting spring
> init");
> ClassLoader classLoader =
> service.getClassLoader();
> ClassPathXmlApplicationContext appCtx =
> new
> ClassPathXmlApplicationContext(new
> String[] {"
> applicationContext.xml"}, false);
> appCtx.setClassLoader(classLoader);
> appCtx.refresh();
> System.out.println("spring loaded");
> } catch (Exception ex) {
> ex.printStackTrace();
> }
> }
>
> If you are still getting the appCtx overwritten with
> that code in both
> AAR's, let us know and we'll take a look at it.
>
> Robert
>
> On 11/22/06, Matthew Hannay
> <[EMAIL PROTECTED]> wrote:
> >
> >
> > I am just getting back to this after a few days
> ....
> >
> >
> > > Are you looking at the latest docs ?
> > Yeah, I am using the latest docs. However looking
> at
> > the new 1.1 doco I't makes things a lot clearer.
> >
> > However I have worked out what my problem is
> > and this could potentially be an axis bug.
> >
> > I have 2 aars each configured to run the spring
> init
> > on startup.
> >
> > what I am finding is the second deployed aar over
> > writes the applicationContext of the first!!
> >
> > so when I hit the first service I get a no spring
> bean
> > found error.
> >
> > The aar deployed second works fine and if I only
> depoy
> > the first aar it works fine too.
> >
> > To me it looks like the second aar blows away the
> > first
> > aar's environment? I have not fished through the
> code
> > to verify this yet.
> >
> > Does any one have any insight? Should I raise this
> as
> > a JIRA?
> >
> > Matt
> >
> >
> >
> >
> >
> >
> >
> >
> > --- robert lazarski <[EMAIL PROTECTED]>
> wrote:
> >
> > > Are you looking at the latest docs ?
> > >
> > >
> >
> >
>
http://svn.apache.org/repos/asf/webservices/axis2/branches/java/1_1/xdocs/1_1/spring.html
> > >
> > > Give me an idea of what's lacking and I'll try
> and
> > > get it in for the
> > > imminent 1.1 release.
> > >
> > > Robert
> > >
> > > On 11/13/06, Matthew Hannay
> > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > Can somthing be done to make the documentation
> a
> > > > little more specific?
> > > >
> > > >
> > > >
> > > > Matt
> > > >
> > > > --- robert lazarski <[EMAIL PROTECTED]>
> > > wrote:
> > > >
> > > > > Since the 'inside the aar' config can't use
> > > > > servletContext because of
> > > > > classloader issues, you need to use the
> > > > > ApplicationContextHolder hook as
> > > > > explained in the 'inside the aar' docs. When
> > > using
> > > > > SpringAppContextAwareObjectSupplier as you
> are
> > > > > doing, that requires the
> > > > > ApplicationContextHolder .
> > > > >
> > > > > HTH,
> > > > > Robert
> > > > >
> > > > > On 11/12/06, Matthew Hannay
> > > > > <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > >
> > > > > > Do I need to wire the
> ApplicationContextHolder
> > > up?
> > > > > > isnt this only for outside a container?
> > > > > >
> > > > > > From what i can gather all I need to do is
> > > > > > put the entries in the services.xml
> > > > > > and this should take care of the class
> loading
> > > and
> > > > > > service deployment
> > > > > >
> > > > > > <parameter name="ServiceTCCL"
> > > > > > locked="false">composite</parameter>
> > > > > > <parameter
> > > name="ServiceObjectSupplier"
> > > > > > locked="false">
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>
org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier
> > > > > > </parameter>
> > > > > > <parameter name="SpringBeanName"
> > > > > > locked="false">
> > > > > > AddressBook_v1_0_0Skeleton
> > > > > > </parameter>
> > > > > >
> > > > > > and the axis spring config/init class
> class
> > > > > > <service name="AddressBook_v1_0_0"
> > > > > >
> > > > >
> > > >
> > >
> >
>
class="au.gov.qld.health.s8online.config.AxisSpringConfig">
> > > > > >
> > > > > >
> > > > > > Matt
> > > > > >
> > > > > > --- robert lazarski
> <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > > >
> > > > > > > Do you have this spring bean wired in
> your
> > > > > > > serviceContect.xml file?
> > > > > > >
> > > > > > > <!-- Configure spring to give a hook to
> > > axis2
> > > > > > > without a ServletContext -->
> > > > > > > <bean id="applicationContext"
> > > > > > > class="
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder"
> > > > > > > />
> > > > > > >
> > > > > > > HTH,
> > > > > > > Robert
> > > > > > >
>
=== message truncated ===
Send instant messages to your online friends http://au.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]