This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Having the same DataSource used by two different applications Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Having the same DataSource used by two different applications" Watch "Having the same DataSource used by two different applications" New topic
Author

Having the same DataSource used by two different applications

Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3327

Hi All,

I have a doubt here. Will there be any issues if the same DataSource with the same JNDI Name being used by two different applications? I have NOT yet tested the same.

Will the Application Server try to rebind the DataSource during the deployment of the new EAR file which happens to use the same JNDI name?

I talk about the J2EE Enterprise applications used. We do use WebSphere Application Server. Though i think it may not be an issue, just wanted to get it confirmed.

Thank you in advance.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Will the Application Server try to rebind the DataSource during the deployment of the new EAR file which happens to use the same JNDI name?

It depends on whether you bind to a local or global JNDI name. as long as you refer to it via the java:comp/env InitialContext, the context that you refer to each time will be local to each EAR and will not overlap.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3327

Thank you David for the quick response
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Having the same DataSource used by two different applications
 
Similar Threads
More than one applications in Jboss?
How to use configured datasource
Finding resources
register data source in JNDI
Error with data source and jndi connectivity