Hi I have written a BMP bean. I compiled all the classes and the xml dd. Then i deployed the bean thru the Deployer Tool. The bean was succesfully deployed. But when trying to run the client, it gives an error message about the database connection .
Can anyone help me about it. i need to know where to start the trouble shoot at.
-
JDBC connection Pool problem with Weblogic 5 (7 messages)
- Posted by: Bhupinder Singh
- Posted on: June 01 2001 10:51 EDT
Threaded Messages (7)
- JDBC connection Pool problem with Weblogic 5 by Tinou Bao on June 01 2001 11:50 EDT
- JDBC connection Pool problem with Weblogic 5 by Dennis Nguyen on June 02 2001 03:17 EDT
- JDBC connection Pool problem with Weblogic 5 by Bhupinder Singh on June 02 2001 08:40 EDT
-
JDBC connection Pool problem with Weblogic 5 by sujoy das on June 03 2001 07:30 EDT
-
JDBC connection Pool problem with Weblogic 5 by Manjunath Reddy on June 03 2001 08:21 EDT
-
JDBC connection Pool problem with Weblogic 5 by Stephen Davies on June 04 2001 12:19 EDT
- JDBC connection Pool problem with Weblogic 5 by manoj sharma on June 05 2001 12:33 EDT
-
JDBC connection Pool problem with Weblogic 5 by Stephen Davies on June 04 2001 12:19 EDT
-
JDBC connection Pool problem with Weblogic 5 by Manjunath Reddy on June 03 2001 08:21 EDT
-
JDBC connection Pool problem with Weblogic 5 by sujoy das on June 03 2001 07:30 EDT
- JDBC connection Pool problem with Weblogic 5 by Bhupinder Singh on June 02 2001 08:40 EDT
-
JDBC connection Pool problem with Weblogic 5[ Go to top ]
- Posted by: Tinou Bao
- Posted on: June 01 2001 11:50 EDT
- in response to Bhupinder Singh
Weblogic newsgroup would be better place to ask you question. But anyways, what is the error you are getting? Include your trace.
--
Tinou Bao
www.tinou.com -
JDBC connection Pool problem with Weblogic 5[ Go to top ]
- Posted by: Dennis Nguyen
- Posted on: June 02 2001 03:17 EDT
- in response to Bhupinder Singh
You wrote a BMP bean (Bean-Managed Persistence). I assume that you must explicitly wrote the persitent logic into the bean class. That means the logic to create, update and remove data associated with an entity. Of course before to do all those tasks you need to call a method getConnection() from a class such as <EntityName>DAO (Data Access Object). This class will handle to get a connection pool to add, update, remove data. Here are the steps you probably need to do to get a pool connection
1)Create a Connection Pool with a specifi name in weblogic.properties
2)Instantiate a Properties object instance which includes db user/passowrd
3) Load a Driver object instance using Class.forName("weblogic.jdbc.pool.Driver"),newInstance()
4) Invoke the connect()method with parameters: "weblogic:jdbc:pool:<nameConnectionPool>, prop object. This method returns a connection pool object instace
There are some other ways such as: using DataSource object to get a connection pool
Hope that helps. More Info go to :http://www.weblogic.com/docs51/classdocs/API_servlet.html#pools0
-
JDBC connection Pool problem with Weblogic 5[ Go to top ]
- Posted by: Bhupinder Singh
- Posted on: June 02 2001 08:40 EDT
- in response to Dennis Nguyen
Hi
Thanks for replying. I am trying the other methoid now, but i was using the datasource in the code. And here is what i wrote
private Connection getConnection() throws SQLException {
try {
Context jndiCntx = new InitialContext();
DataSource ds =
(DataSource)jndiCntx.lookup("java:comp/env/jdbc/myOraclePool");
return ds.getConnection();
}
catch (NamingException ne) {
throw new EJBException(ne);
}
I was calling this getConnection method from all the places to get a connection object.
Please look at it and let me know whats wrong.
Thanks for the help once again
Regards
Bhupinder -
JDBC connection Pool problem with Weblogic 5[ Go to top ]
- Posted by: sujoy das
- Posted on: June 03 2001 19:30 EDT
- in response to Bhupinder Singh
What exception exactly you are getting?That will be helpful to analyze your problem. Would you please send the exception. -
JDBC connection Pool problem with Weblogic 5[ Go to top ]
- Posted by: Manjunath Reddy
- Posted on: June 03 2001 20:21 EDT
- in response to sujoy das
From the above snippets, though the actual stack/error trace is missing, let me hazard a solution ...
1. Check the deployed xml configuration and check if the jndi name for looking up sql datasource is correct(myOraclePool).
2. Check if the oracle listener is running.
Meanwhile do post the stack trace so that the problem is clear. -
JDBC connection Pool problem with Weblogic 5[ Go to top ]
- Posted by: Stephen Davies
- Posted on: June 04 2001 00:19 EDT
- in response to Manjunath Reddy
I have a paper that describes how to do this. Check out http://users.bigpond.net.au/stephen.davies/implementingBMP.html -
JDBC connection Pool problem with Weblogic 5[ Go to top ]
- Posted by: manoj sharma
- Posted on: June 05 2001 00:33 EDT
- in response to Stephen Davies
HI
there
kindly trace the exception and write for more
solution.