• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic