1 Reply Latest reply on Dec 30, 2012 9:43 PM by beanfarmer

    Issue with redirected home page accessing two datasources

    beanfarmer

      Hello,

       

            Problem scenario:

            I am accessing my application using URL: "http://localhost:8080/context/" so there after it goes to "index.html" and from there redirected to "home.seam".

            Before rendering "home.seam" I execute page actions which will load data from multiple datasources, one from Oracle server and other from MS SQL server.  

         

           Because of that jboss gives me following error:

         

      07:05:41,002 WARN  [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@43a39b

       

      07:05:41,002 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null

       

      07:05:41,002 ERROR [JDBCExceptionReporter] 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: a33050e:1276:50be257d:64d status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.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: a33050e:1276:50be257d:64d status: ActionStatus.ABORT_ONLY >))

       

            Observation: This problem does not occur when I am accessing home page directly like "http://localhost:8080/context/home.seam".

       

      Could you please let me know "how to make it work for "http://localhost:8080/context/"? Appreciate your help.

       

      Regards,

      Srinivasan Thoyyeti.

        • 1. Re: Issue with redirected home page accessing two datasources
          beanfarmer

          Option 1 > if possible recommended>

          I have solved this by making one of the "read only" datasources as <no-tx-datasource> in *ds.xml.

           

          Option 2> if option 1 not possible then>

          if you need to r/w both datasources then update com.arjuna.ats.jta.allowMultipleLastResources property in "\jboss-5.1.0.GA\server\default\conf\jbossts-properties.xml".

          <property name=”com.arjuna.ats.jta.allowMultipleLastResources” value=”true” />