[jboss-user] [JNDI/Naming/Network] - Re: java.naming.provider.url parsing problem?

csturtz do-not-reply at jboss.com
Wed Aug 30 10:07:19 EDT 2006


Here's something I found on the JBoss wiki.  It sounds like I should be able to access the DataSource remotely.  

http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources

anonymous wrote :  Configuring a DataSource for remote usage
  | As of jboss-4.0.0 there is support for accessing a DataSource from a remote client. The one change that is neccessary for the client to be able to lookup the DataSource from jndi is to specify use-java-context=false as shown here:
  | 
  | 
  |   <local-tx-datasource>
  |     <jndi-name>GenericDS</jndi-name>
  |     <use-java-context>false</use-java-context>
  |     <connection-url>...</connection-url>
  | ...
  | 
  | This results in the DataSource being bound under the jndi name "GenericDS" instead of the default of "java:/GenericDS" which restricts the lookup to the same vm as the jboss server.
  | 
  | Note: JBoss does not recommend using this feature on a production environment. It requires accessing a connection pool remotely and this is an anti-pattern as connections are not serializable. Besides, transaction propagation is not supported and it could lead to connection leaks if the remote clients are unreliable (i.e crashes, network failure). If you do need to access a datasource remotely, JBoss recommends accessing it via a remote session bean facade. 

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

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



More information about the jboss-user mailing list