[jboss-user] [EJB 3.0] - Re: Dynamic units within persistence.xml

lord_jorge do-not-reply at jboss.com
Wed Dec 17 12:03:20 EST 2008


Hi guys,

I had created a factory class that use Ejb3Configuration to add the dynamic persistent-units.

I tried to test connecting to a DS db001ds and made a persist and a find operation successfully.

But when I try to create 2 EntityManagerFactory's, (DS db001ds and db002ds) i get the following warn:

  | ...
  | 14:09:45,953 INFO  [DatasourceConnectionProvider] Using datasource: java:/db002ds
  | 14:09:45,984 WARN  [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallo
  | w] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource at 1bc6b34
  | 14:09:46,000 WARN  [SettingsFactory] Could not obtain connection metadata
  | org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Una
  | bled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57ffbb:5b6:49492433:65 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.j
  | boss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable:
  | Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57ffbb:5b6:49492433:65 status: ActionStatus.ABORT_ONLY >))
  |         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
  | ...
  | 

And any subsequent call to the EntityManager of db002ds throws the same message, but now like error and not warn.

Someone had used Ejb3Configuration without trouble to connect in multiple persistent units?
Thanks for your time,

Jorge

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197188#4197188

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197188



More information about the jboss-user mailing list