|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
General J2EE
General J2EE
General J2EE
|
Messages: 4
Messages: 4
Messages: 4
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Creating JDBC Connection Pool programmaticalli for glassfish.
Hi
I want to create JDBC connection pool in the server programmatically. that is an application admin can define a datasource for the application. (Oracle , Ms SQL, MySql, or DB2) this will be the datasource used by the EJB part of my application. Can anyone explain me how to do this programmatically...
either by creating an XML file and copying it to a directory i nthe server or using JMX. I cannot use asadmin utility since it is sifficult to make a native call since the app is definitely gonna run in all platforms.
thanks
|
|
Message #227518
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Creating JDBC Connection Pool programmaticalli for glassfish.
I am surprise you have to do this programmatically when containers provide out-of-the-box support for what you are trying to do.... .....pl. don't even plan to go this route... it will be a fiasco if you decided to do so.....
Especially from performance tuning perspective it will be a nightmare to deal with if you do this programmatically...
Sorry for discouraging but that’s the reality….
Still if you wanted to write your own connection manager then check up on any open source connection manager stuff which will give you some headway.
Good luck,
Cheers H. Kanthi
|
|
Message #227550
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Creating JDBC Connection Pool programmaticalli for glassfish
Hi I think you have got my point wrong.
I want to define a new datasource in the server when the user wants to change the database he's using. for example lets say the DB server is MSSQL and resides in server name "ARC". And there is a Connection Pool defined in the App Server for the SQL server in ARC. But user decides to move the DB to a server called "NOAH" then I cannot ask the user to go to the admin console and change the datasource. I need to provide a GUI tool for the user to do it.
Its a somethin like what u have in netbeans "server resources" . netbeans will allow you to configure a datasource from the IDe and deploy it. This is the same thing i want to do.
|
|
Message #227687
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Creating JDBC Connection Pool programmaticalli for glassfish
why would you want to do this?????????? use an open-source connection pool and call it a night,and get a drink.
if you really want to do this, just download the source code for c3PO and see how it's done..they use a .properties file..
|
|
 |
Hot threads
Hot threads
Hot threads
|
More hot threads
More hot threads
More hot threads
|
 |
Brian Goetz continues to lift the lid and peak into the inner workings of Java in Java Urban Performance Legends. In this article he exposes the fallacy behind some of the more common performance myths found in the annals of the JVM.
(93 comments,
last posted
February 06, 2009)
Bruce Tate, author of Better, Faster Lighter Java and Bitter EJB has come out with a new book called Beyond Java. Bruce has an epiphany about the future of software development. Does it include Java?
(770 comments,
last posted
September 23, 2009)
Looks like today AJAX concept have several interpretations. We can distinguish different approaches of AJAX integration. Can they co-exist within the same application? Can we talk about layered AJAX integration?
(68 comments,
last posted
May 08, 2008)
Artima has published a short article describing the Design-Time API for JavaBeans, which was recently approved as JSR 273. This API promises to bring VB-like ease to Java development, but may face a cultural bias among Java developers who tend to think more in terms of class libraries than components.
(225 comments,
last posted
November 19, 2009)
There is plenty of speculation today regarding a potential buyout of Sun Microsystems by Scott McNealy and Silver Lake Partners. How would privatization of Sun affect Java?
(16 comments,
last posted
May 15, 2009)
More hot threads »
|
|