Hi, I've the following code in my stateless session bean:
info- is value object for client exchange(CustomerStore init data)
jdo- DataObjects.
database in use- Oracle9/local datasource.
CustomerStore- persistent object
both methods declared as <transaction>RequiresNew</transaction>
1)--------------------------------------------------------------------------
---
public String setCustomer( CustomerInfo info) throws PeoException{//create
operation
Database db= null;
try{
db= jdo.getDatabase();
((Peo)ctx.getEJBObject()).setCustomer_x(info);//for new transaction-
nested invocation( Line 141)
}catch( Exception e){
e.printStackTrace();
throw new PeoException( e.getMessage());
}finally{
try{
if( db!= null) db.close();
}catch( PersistenceException pe){ throw new EJBException( pe);}
}
return info.getCustomer();
}
2)--------------------------------------------------------------------------
-
public void setCustomer_x( CustomerInfo info) throws PeoException{
Database db= null;
try{
db= jdo.getDatabase();
com.ezan.Contact.CustomerStore cs= new com.ezan.Contact.CustomerStore();
cs.setInfo( info);
db.create( cs);
}catch( PersistenceException pe){ throw new EJBException( pe);
}finally{
try{
if( db!= null) db.close();
}catch( PersistenceException pe){ throw new EJBException( pe);}
}
}
//-------------------------------------------------------------------
Client invoke setCustomer( CustomerInfo) and got Exception:
Client StackTrace:
java.lang.IllegalArgumentException: disconnect(ManagedConnection mc:
null, Object c:
org.jboss.resource.adapter.jdbc.local.LocalConnection@b2e752) ca
lled with unknown managed connection
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.unregiste
rAssociation(BaseConnectionManager2.java:661)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.disconnec
t(BaseConnectionManager2.java:619)
at
org.jboss.resource.connectionmanager.CachedConnectionManager.disconne
ct(CachedConnectionManager.java:358)
at
org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaA
wareObject(CachedConnectionManager.java:149)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
ke(CachedConnectionInterceptor.java:190)
at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
elessSessionInstanceInterceptor.java:77)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:96)
... 18 more
//------------------------------------------------------------------------
JBoss console:
21:10:06,901 ERROR [STDERR] java.rmi.ServerException: xaRes not enlisted;
nested
exception is:
java.lang.IllegalArgumentException: xaRes not enlisted
21:10:06,901 ERROR [STDERR] at
org.jboss.ejb.plugins.AbstractTxInterceptor.i
nvokeNext(AbstractTxInterceptor.java:119)
21:10:06,901 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWit
hTransactions(TxInterceptorCMT.java:242)
21:10:06,901 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
21:10:06,901 ERROR [STDERR] at
org.jboss.ejb.plugins.SecurityInterceptor.inv
oke(SecurityInterceptor.java:129)
21:10:06,911 ERROR [STDERR] at
org.jboss.ejb.plugins.LogInterceptor.invoke(L
ogInterceptor.java:166)
21:10:06,911 ERROR [STDERR] at
org.jboss.ejb.StatelessSessionContainer.invok
e(StatelessSessionContainer.java:313)
21:10:06,911 ERROR [STDERR] at
org.jboss.ejb.Container.invoke(Container.java
:705)
21:10:06,911 ERROR [STDERR] at
org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:491)
21:10:06,911 ERROR [STDERR] at
org.jboss.invocation.local.LocalInvoker.invok
e(LocalInvoker.java:98)
21:10:06,911 ERROR [STDERR] at
org.jboss.invocation.InvokerInterceptor.invok
e(InvokerInterceptor.java:102)
21:10:06,911 ERROR [STDERR] at
org.jboss.proxy.TransactionInterceptor.invoke
(TransactionInterceptor.java:73)
21:10:06,911 ERROR [STDERR] at
org.jboss.proxy.SecurityInterceptor.invoke(Se
curityInterceptor.java:76)
21:10:06,911 ERROR [STDERR] at
org.jboss.proxy.ejb.StatelessSessionIntercept
or.invoke(StatelessSessionInterceptor.java:111)
21:10:06,911 ERROR [STDERR] at
org.jboss.proxy.ClientContainer.invoke(Client
Container.java:76)
21:10:06,911 ERROR [STDERR] at $Proxy23.setCustomer_x(Unknown Source)
21:10:06,911 ERROR [STDERR] at
com.ezan.Session.PeoBean.setCustomer(PeoBean.
java:141) //((Peo)ctx.getEJBObject()).setCustomer_x(info);
etc.
What's the problem?
Thank you.
P.S. Castor page(http://www.jboss.org/developers/projects/jboss/castor.jsp)
on jboss.org has not working
link(http://www.jboss.org/developers/projects/castorjdo/castor-jdo-plugin.ja
r)- plugin for JBoss3.0.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev