Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 86733 invoked from network); 30 Sep 2006 18:04:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Sep 2006 18:04:17 -0000 Received: (qmail 41182 invoked by uid 500); 30 Sep 2006 18:04:10 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 41156 invoked by uid 500); 30 Sep 2006 18:04:10 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 41145 invoked by uid 99); 30 Sep 2006 18:04:10 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Sep 2006 11:04:10 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=nathan.mittler@gmail.com; domainkeys=good X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from [64.233.166.180] ([64.233.166.180:29062] helo=py-out-1112.google.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id EE/72-27306-991BE154 for ; Sat, 30 Sep 2006 11:04:09 -0700 Received: by py-out-1112.google.com with SMTP id x66so1868697pye for ; Sat, 30 Sep 2006 11:04:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=axnyDC0MzN/wQn4LAw0oXszNVJLkt1AfmQ1jpvCE6HODeiN7OFjU+UlIrYdOb/qqbddo4N05mKC8I+4hpPoGPGCDWC/lCL0IJ8//UJi716w0ap+GNtva31vWWfju0qjDcjIrguLPo5KtyWG6oYPdM3TH0L31SpDlk3nYCH5Mi28= Received: by 10.35.123.10 with SMTP id a10mr3314204pyn; Sat, 30 Sep 2006 11:04:06 -0700 (PDT) Received: by 10.35.19.13 with HTTP; Sat, 30 Sep 2006 11:04:06 -0700 (PDT) Message-ID: <8a6feb940609301104u4327cef1y59a894b43498ef96@mail.gmail.com> Date: Sat, 30 Sep 2006 14:04:06 -0400 From: "Nathan Mittler" To: user@geronimo.apache.org Subject: Re: classloaders for non-JMS MDBs In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_42473_9867994.1159639446655" References: <8a6feb940609300827u3097c7fct60a7006cfa135897@mail.gmail.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_42473_9867994.1159639446655 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline David, Thanks for the response. Sure thing - I've captured the stack trace from the ejbCreate method of both MDBs. First, here's the stack trace from the JMS MDB: java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1158) at com.test.CourierPositionMDB.ejbCreate(CourierPositionMDB.java:32) at com.test.CourierPositionMDB$$FastClassByCGLIB$$c60caec2.invoke () at org.openejb.slsb.EJBCreateMethod.execute(EJBCreateMethod.java:94) at org.openejb.dispatch.DispatchInterceptor.invoke( DispatchInterceptor.java:72) at org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke( ComponentContextInterceptor.java:56) at org.openejb.mdb.MDBInstanceContext.ejbCreate( MDBInstanceContext.java:153) at org.openejb.mdb.MDBInstanceFactory.createInstance( MDBInstanceFactory.java:72) at org.openejb.util.SoftLimitedInstancePool.acquire( SoftLimitedInstancePool.java:81) at org.openejb.mdb.MDBInstanceInterceptor.invoke( MDBInstanceInterceptor.java:81) at org.openejb.SystemExceptionInterceptor.invoke( SystemExceptionInterceptor.java:82) at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242) at org.openejb.mdb.EndpointHandler.invoke(EndpointHandler.java:180) at org.openejb.mdb.EndpointHandler.intercept(EndpointHandler.java :223) at org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$$e708dc8a.onMessage () at org.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage( MessageEndpointProxy.java:117) at org.activemq.ra.MessageEndpointProxy.onMessage( MessageEndpointProxy.java:57) at org.activemq.ActiveMQSession.deliver(ActiveMQSession.java:569) at org.activemq.ActiveMQSession.run(ActiveMQSession.java:551) at org.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165) at org.apache.geronimo.connector.work.WorkerContext.run( WorkerContext.java:291) at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172) at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run( ThreadPool.java:289) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Thread.java:595) ... and here's the stack trace from the custom MDB: java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1158) at com.test.CourierPositionMDB.ejbCreate(CourierPositionMDB.java:56) at com.test.CourierPositionMDB$$FastClassByCGLIB$$adae8521.invoke () at org.openejb.slsb.EJBCreateMethod.execute(EJBCreateMethod.java:94) at org.openejb.dispatch.DispatchInterceptor.invoke( DispatchInterceptor.java:72) at org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke( ComponentContextInterceptor.java:56) at org.openejb.mdb.MDBInstanceContext.ejbCreate( MDBInstanceContext.java:153) at org.openejb.mdb.MDBInstanceFactory.createInstance( MDBInstanceFactory.java:72) at org.openejb.util.SoftLimitedInstancePool.acquire( SoftLimitedInstancePool.java:81) at org.openejb.mdb.MDBInstanceInterceptor.invoke( MDBInstanceInterceptor.java:81) at org.openejb.SystemExceptionInterceptor.invoke( SystemExceptionInterceptor.java:82) at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242) at org.openejb.mdb.EndpointHandler.invoke(EndpointHandler.java:180) at org.openejb.mdb.EndpointHandler.intercept(EndpointHandler.java :223) at org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$$224d7765.onCourierPosition () at com.test.ra.EndpointWorker$1.run(EndpointWorker.java:109) at org.apache.geronimo.connector.work.WorkerContext.run( WorkerContext.java:291) at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172) at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run( ThreadPool.java:289) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Thread.java:595) Thanks, Nate On 9/30/06, David Jencks wrote: > > > On Sep 30, 2006, at 8:27 AM, Nathan Mittler wrote: > > > Hi, > > Has anyone created custom connectors with G? > > > > I have a two versions of a simple MDB - one that implements > > javax.jms.MessageListener and one that implements a custom > > interface. When onMessage is invoked by the AMQ RAR, I appear to > > be in the context of the MDB's classloader and can use dependencies > > specified in the MDB's deployment plan. However, when I invoke the > > MDB from a custom connector, it seems to be in the context of the > > RAR classloader and I don't have access to any of the MDB's > > dependencies. I assume that I'm doing something bone-headed in my > > connector, but I'm not seeing it. Any ideas? > > It oughtta work :-). I don't think it's your connector. Would it be > difficult to get stack traces from the mdbs to see if the paths to > get to the mdb are different? > > thanks > david jencks > > > > > Thanks for the help, > > Nate > > ------=_Part_42473_9867994.1159639446655 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline David, Thanks for the response.  Sure thing - I've captured the stack trace from the ejbCreate method of both MDBs.

First, here's the stack trace from the JMS MDB:

java.lang.Exception: Stack trace
        at java.lang.Thread.dumpStack(Thread.java:1158)
        at com.test.CourierPositionMDB.ejbCreate(CourierPositionMDB.java:32)
        at com.test.CourierPositionMDB$$FastClassByCGLIB$$c60caec2.invoke(<generated>)
        at org.openejb.slsb.EJBCreateMethod.execute(EJBCreateMethod.java:94)
        at org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.java:72)
        at org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(ComponentContextInterceptor.java:56)
        at org.openejb.mdb.MDBInstanceContext.ejbCreate(MDBInstanceContext.java:153)
        at org.openejb.mdb.MDBInstanceFactory.createInstance(MDBInstanceFactory.java:72)
        at org.openejb.util.SoftLimitedInstancePool.acquire(SoftLimitedInstancePool.java:81)
        at org.openejb.mdb.MDBInstanceInterceptor.invoke(MDBInstanceInterceptor.java:81)
        at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
        at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
        at org.openejb.mdb.EndpointHandler.invoke(EndpointHandler.java:180)
        at org.openejb.mdb.EndpointHandler.intercept(EndpointHandler.java:223)
        at org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$$e708dc8a.onMessage(<generated>)
        at org.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:117)
        at org.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:57)
        at org.activemq.ActiveMQSession.deliver(ActiveMQSession.java:569)
        at org.activemq.ActiveMQSession.run(ActiveMQSession.java:551)
        at org.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
        at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172)
        at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:289)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)

... and here's the stack trace from the custom MDB:

java.lang.Exception: Stack trace
        at java.lang.Thread.dumpStack(Thread.java:1158)
        at com.test.CourierPositionMDB.ejbCreate(CourierPositionMDB.java:56)
        at com.test.CourierPositionMDB$$FastClassByCGLIB$$adae8521.invoke(<generated>)
        at org.openejb.slsb.EJBCreateMethod.execute(EJBCreateMethod.java:94)
        at org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.java:72)
        at org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(ComponentContextInterceptor.java:56)
        at org.openejb.mdb.MDBInstanceContext.ejbCreate(MDBInstanceContext.java:153)
        at org.openejb.mdb.MDBInstanceFactory.createInstance(MDBInstanceFactory.java:72)
        at org.openejb.util.SoftLimitedInstancePool.acquire(SoftLimitedInstancePool.java:81)
        at org.openejb.mdb.MDBInstanceInterceptor.invoke(MDBInstanceInterceptor.java:81)
        at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
        at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
        at org.openejb.mdb.EndpointHandler.invoke(EndpointHandler.java:180)
        at org.openejb.mdb.EndpointHandler.intercept(EndpointHandler.java:223)
        at org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$$224d7765.onCourierPosition(<generated>)
        at com.test.ra.EndpointWorker$1.run(EndpointWorker.java:109)
        at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172)
        at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:289)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)

Thanks,
Nate


On 9/30/06, David Jencks <david_jencks@yahoo.com> wrote:

On Sep 30, 2006, at 8:27 AM, Nathan Mittler wrote:

> Hi,
> Has anyone created custom connectors with G?
>
> I have a two versions of a simple MDB - one that implements
> javax.jms.MessageListener and one that implements a custom
> interface.  When onMessage is invoked by the AMQ RAR, I appear to
> be in the context of the MDB's classloader and can use dependencies
> specified in the MDB's deployment plan.  However, when I invoke the
> MDB from a custom connector, it seems to be in the context of the
> RAR classloader and I don't have access to any of the MDB's
> dependencies.  I assume that I'm doing something bone-headed in my
> connector, but I'm not seeing it.  Any ideas?

It oughtta work :-).  I don't think it's your connector.  Would it be
difficult to get stack traces from the mdbs to see if the paths to
get to the mdb are different?

thanks
david jencks

>
> Thanks for the help,
> Nate


------=_Part_42473_9867994.1159639446655--