Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I use the connection pool of jboss?

 
Kay Tracid
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
how can I use the connection pool of jboss? I use oracle 9i, I'm looking for an example or documentation.
Thanks a lot
Kay
 
Kay Tracid
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I try this from a client application:
DataSource ds = (DataSource)ctx.lookup("java racleDS");
my JBoss startet with the INFO:
[OracleDS] Bound connection factory for resource adapter 'JBoss LocalTransaction JDBC Wrapper' to JNDI name 'java:/OracleDS'
additionell i get some warnings:
WARN [ServiceController] jboss.jca:service=LocalTxDS,name=OracleDS does not implement any Service methods
I get the exception
javax.naming.NameNotFoundException: OracleDS not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
while starting the client.
Why I get this exception? where is my mistake? I read I must use a jboss.xml file? is that right? Waht is the content of this file and where should i store the file?
please help
 
Kay Tracid
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can somebody help please?
 
arun sahni
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kay
The message shows it is bound to jndi. The datasource in JBoss is bound to jndi for local transaction and its datasource can not access out side the jvm in which JBoss is runing. You can find more info in
http://JBoss.org/forums/thread.jsp?forum=144&thread=19891&message=3736850&q=gobal%2Bjndi%2Bnamespace
This problem I mentioned in my start level guide which can be downloaded here.
Happy JBossing.
[ January 16, 2003: Message edited by: arun sahni ]
 
Kay Tracid
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks arun. Now I understand my mistake. But I still dont know how to use the jboss connection pool with an client application. Should I write a Bean that returns the connection? Have you any hints?
Thanks a lot!!
[ January 17, 2003: Message edited by: Kay Tracid ]
 
arun sahni
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kay
I am not sure why you want to use datasource outside server JVM. If you want to use for connection pooling then better go with some other package.
If you want to write database oriented applcation then use CMP/BMP then client will not access database direclty .
 
Yuri Litvinov
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arun,
I have similar problem. The reason for using DataSource from outside JBoss JVM is that I need to download BLOB from database.
Most of database related code resides in EJB but I do not want to use serialization for BLOB. In this particular case I want to open connection from client, using existing DataSource.
Is there any way to do that?
Thanks.
P.S. Unfortunately both links you provided in Jan are not working now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic