Title: Is it possible to use a Local Interface to an EJB from an MBean thread in the same VM?

I've got

client -> EJB -> MBean -> EJB
  1        2       3       4

this works fine when 2, 3 and 4 are all in the same
thread, but when I have the MBean create a new thread
I get NullPointerException (stack trace is below) trying
to call my EJB through a local interface.

I'm using an MBean so I can create a thread to have
things run asynchronously in JBoss.  Is this not
the right way to design this?  Should it work?

JBoss 3.0 Beta
Linux
JDK 1.4

Thanks!
JD

Stack trace:
13:22:08,797 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
java.lang.NullPointerException
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getApplicationTxDataMap(JDBCStoreManager.java:196)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getApplicationTxData(JDBCStoreManager.java:212)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getEntityTxDataMap(JDBCStoreManager.java:224)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getEntityTxData(JDBCStoreManager.java:233)
        at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.getPreloadDataMap(ReadAheadCache.java:368)
        at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.load(ReadAheadCache.java:204)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:76)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:62)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:415)
        at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:388)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:304)

        at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:283)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:147)

        at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:187)
        at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:219)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
        at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:474)
        at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:307)
        at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker$EntityProxy.invoke(BaseLocalContainerInvoker.java:407)
        at $Proxy531.getTaskType(Unknown Source)
        at com.rendition.service.TaskDaemon$TaskRunner.run(TaskDaemon.java:420)
        at java.lang.Thread.run(Thread.java:536)
13:22:08,802 ERROR [STDERR] javax.ejb.TransactionRolledbackLocalException: Error getting application tx data map.
Embedded Exception
null; nested exception is:
        javax.ejb.EJBException: Error getting application tx data map.
Embedded Exception
null
Embedded Exception
Error getting application tx data map.
Embedded Exception
null; nested exception is:
        javax.ejb.EJBException: Error getting application tx data map.
Embedded Exception
null
--

Reply via email to