wood burning stoves 2.0*
The moose likes Websphere and the fly likes Creating datasources using JMX in WAS5.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Creating datasources using JMX in WAS5.1" Watch "Creating datasources using JMX in WAS5.1" New topic
Author

Creating datasources using JMX in WAS5.1

prashanth nagaraj
Ranch Hand

Joined: Mar 11, 2002
Posts: 43
Hi,
Can you please tell me how do I create datasources in Websphere Appserver by using JMX. In JBoss app server, there is an option of creating datasources using JMX by specifying in jboss-service.xml.
I wanted to know whether Websphere supports creation of datasources using JMX, if so, how do I do it. I wanted to create two datasources(No-Transaction and Transaction)in the scope of Local Transaction.


regards,<br />prashanth nagaraj
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
It is possible to create a datasource with JMX, but not within a running application. If you intend on using creating a datasource dynamically and using it within your running program it's not possible.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
prashanth nagaraj
Ranch Hand

Joined: Mar 11, 2002
Posts: 43
No, it wont be dynamic.I will not be creating them explicitly from my application during the run time.
I want to create the datasources before I start the server.
My requirement is I have to create two datasources in the scope of Local Transaction.(No distributed transactions). One datasource will be no-transaction mode and the other with transaction mode. In Jboss, I am using
org.jboss.resource.connectionmanager.NoTxConnectionManager no transaction datasource and org.jboss.resource.connectionmanager.LocalTxConnectionManager for transaction datasource.
I am porting the application to Websphere app server.
Please let me know how do I create the above mentioned datasources using JMX in Websphere. Can you give me example code for the same.
Currently, I have created two datasources using adminconsole, but I am geting too many errors , so I wanted to try usng JMX.
Thanks
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
What do you mean "you're getting too many errors"? Why do you think creating them with JMX will fix that? That's not very logical...
What are the errors you're receiving? Have you RTFM in the InfoCenter on creating DataSources?
Kyle
 
 
subject: Creating datasources using JMX in WAS5.1