• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bean Managed Vs Container managed  RSS feed

 
priya Anand
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a session management issue with my Stateless EJB.

I changed the Bean Managed transaction type to container managed transaction type.

But after that i am getting the following error,

[#|2009-04-06T13:58:57.961-0400|SEVERE|sun-appserver-ee8.1_02|javax.enterprise.resource.resourceadapter|_ThreadID=16;|RAR5031:System Exception
javax.resource.ResourceException: This Managed Connection is not valid as the phyiscal connection is not usable
at com.sun.gjc.spi.ManagedConnection.checkIfValid(ManagedConnection.java:583)
at com.sun.gjc.spi.ManagedConnection.getLocalTransaction(ManagedConnection.java:359)
at com.sun.enterprise.resource.ConnectorXAResource.commit(ConnectorXAResource.java:80)
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:305)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:336)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2754)
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a connection pool issue. I would double-check the connection settings (validation, reconnect, auto-commit, XA, etc). If nothing is obvious, it is probably best to pursue this with the GlassFish folks.

Hope it helps,
Reza
 
priya Anand
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Reza,

Thanks for your reply.

I had another question about following,

Stateless Session Beans
Like a stateful session bean, a stateless session bean performs a task for a particular client. Unlike a stateful session bean, stateless session beans do not maintain client state. A stateless session bean may maintain state only for the duration of a method invocation. When the method is finished, the state is no longer retained.

If the above statement is true, I still see that my method loses its state even before finishing.

Any help is Appriciated.

Thanks,
Priya
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you mean. Can you post an example?

Thanks,
Reza
 
Rahul Ba
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look at the configuration file for XA. I doubtful on XA resource. Please put your configuration here....with details.

Regards,
Rahul
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!