This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes how can create datasources during build time? (connection pooling api?) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "how can create datasources during build time? (connection pooling api?)" Watch "how can create datasources during build time? (connection pooling api?)" New topic
Author

how can create datasources during build time? (connection pooling api?)

Elhanan Maayan
Ranch Hand

Joined: May 04, 2009
Posts: 112
hi..

i woulid like to create data sourec dynamically during build scripts of ant, i understand there are Connection pooling API's (at least they were in was 4) but i can't see any docs on the subject.
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
You can create datasource, connection pools along with detailed properties using Jython script. The script is invoked using wsadmin (.bat or .sh). So technically you can create a batch file, which gets called from ant. The batch file will call wsadmin with the name of the Jython script to create datasource etc.
Elhanan Maayan
Ranch Hand

Joined: May 04, 2009
Posts: 112
actually we would like to avoid jython completly and try to use java alone, as jython is hard to debug and write...
i was more aiming for this:
http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?topic=/com.ibm.websphere.v35.doc/wass_content/040204020101.html


onlhy for websphere 6.1
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

That link describes what a component, which is running inside Websphere, would have to do to create its own private connection pool.

Presumably you already know how to configure a connection pool in Websphere, using the administration application. But you don't want to do that, you want to configure a connection pool at some other time. Using Ant, apparently. I don't understand what you are trying to do, or why, or what you expect to produce.
Elhanan Maayan
Ranch Hand

Joined: May 04, 2009
Posts: 112
we are trying to build a script that given connection data a developer supplied would create it's own connection pool data. think of it as part of a installation script for an ear.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Okay. And what facilities exist in an EAR file to describe connection pools?

Once you have an answer to that, then (assuming such a facility exists) it would be possible to ask a question about how to use it.
Elhanan Maayan
Ranch Hand

Joined: May 04, 2009
Posts: 112
we are using spring beans to describe current connesions, the bean could either be a simple DbCp bean, or a our own pojo which shall describe the the connection propeties, in case it's our own pojo's the build script will generate jndi data sources (XA ones) in the server during installation, by the same name of the spring bean id. during run time this pojo will actually retrive the jndi data source from the server.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can create datasources during build time? (connection pooling api?)
 
Similar Threads
connection pooling
how to give database connection string in configuration file
connection pooling manually
Connection Pooling
Why close the connection, statement and resultset?