This content has been marked as final.
Show 6 replies
-
2. Re: Multiple sessions for multiple datasources in JBoss?
gan.gary Jun 17, 2008 6:38 AM (in response to gan.gary)Thanks, do you know any simple Hello World example for these?
I found blur for the site you gave. -
3. Re: Multiple sessions for multiple datasources in JBoss?
marklittle Jun 17, 2008 7:44 AM (in response to gan.gary)Why do you need an example? Simply follow the instructions on the wiki.
-
4. Re: Multiple sessions for multiple datasources in JBoss?
gan.gary Jun 18, 2008 10:38 PM (in response to gan.gary)"mark.little@jboss.com" wrote:
Why do you need an example? Simply follow the instructions on the wiki.
Are you talking about this one?In these situations we recommend one of the following approaches:
Wrap the resources in compensating transactions. See the Web Services transactions guides for further details.
Migrate the legacy implementations to two-phase aware equivalents. For DataSources deployed on JBoss Application Server, this is as simple as changing from <local-tx-datasource> to <xa-datasource>. See ConfigDataSources for more information.
Refactor the code to use separate transactions. If you simply need to read from one DataSource and insert processed results into another, you may not want or need 2-phase commit (and thus the above optimization). In an EJB3 session bean, this can be accomplished by simply delegating the read to a separate method and annotating it with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW). This causes the calling method's Transaction to suspend, wait for the read to complete, and resume. -
5. Re: Multiple sessions for multiple datasources in JBoss?
marklittle Jun 23, 2008 7:19 AM (in response to gan.gary)I refer to the URL Jonathan added.
-
6. Re: Multiple sessions for multiple datasources in JBoss?
gan.gary Jun 23, 2008 7:42 PM (in response to gan.gary)Thanks. I found it. It's at: http://wiki.jboss.org/wiki/SetUpAMSSQLDatasource