Unfortunately, it appears that JBoss doesn't allow CMP beans to programatically
set the bean datasource. I think this is a limitation of EJB and no other
application server allows it either. The datasource is bound when CMP beans
are first loaded. You can however, create multiple deployments of the same
beans pointing at different data sources. In the deployment jar, the
jbosscmp-jdbc.xml should be modified to point at an alternate data source
configuration, and the jboss.xml JNDI names should be changed to avoid
conflicts.
For example, the jboss.xml:
<ejb-name>MasterSymbol</ejb-name>
<local-jndi-name>tree/MasterSymbolLocalHome</local-jndi-name>
Becomes:
<ejb-name>MasterSymbol</ejb-name>
<local-jndi-name>tree/MasterSymbolLocalHome2</local-jndi-name>
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867695#3867695
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867695
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user