aspose file tools*
The moose likes JDBC and the fly likes 2 EARs Sharing 1 Data Source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "2 EARs Sharing 1 Data Source" Watch "2 EARs Sharing 1 Data Source" New topic
Author

2 EARs Sharing 1 Data Source

Elle Atechsy
Ranch Hand

Joined: Jan 23, 2004
Posts: 96
Hi,

EAR file 1 opens connections when needed and then closes after done. While EAR file 1 may be running, EAR file 2 needs to connect to the same datasource. But it seems that EAR file 2 can never get a connection from the pool. Please see the following errors I get.

*****************
J2CA0045E: Connection not available while invoking method queueRequest for resource jdbc/InterfaceMonitor

J2CA0020E: The Connection Pool Manager could not allocate a Managed Connection: com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException:
*****************

Can anyone tell me if 2 EAR files on the same application server, in WAS 5.1, can use the same datasource & connection pool at the same time? If so, what am I doing wrong?

Thanks,
Lulu
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

Lulu,
You can definitely have two EARs using the same data source at the same time. check the number of "max connections" for the datasource and make sure it isn't one.

You can check this by going to the WAS admin console and looking at the datasource (under resources.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2 EARs Sharing 1 Data Source
 
Similar Threads
Oracle thin driver connectivity
Connection Pool
Creating datasource and Closing connection?
Difference between connection.commit and usertransaction.commit
Difference between DataSource and ConnectionPoolDataSource