Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connection Pooling

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,
I want to know what is connection pooling in JBoss? and how it is used to access SOL and ORACAL database?. Can connection pooling be done throgh coding? If so anybody has sample code snippets please do farward me.

Regards
Jayant
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi jayant,
You can easily create connection pool in JBoss. You need to deploy the xxxx-ds.xml file in to the jboss/server/default/deploy folder. You will get the sample xxxxxx-ds.xml files from the docs/examples/jca direcoty, that is coming along with the jboss build. To create oracle connection pool, you have to deploy the oracle-ds.xml (name doe's not mean much) in the jboss/server/default/deploy directory. (or in the instance which one you are using).

oracle.ds.xml file
------------------


You need to change it according to your environment.

Now you can lookup your connection pool from any J2EE component, that is deployed in the server.

the lookup code is
------------------


yourdsname should be the same as in oracle-ds.xml file.

hope this will help you.
[ May 05, 2005: Message edited by: Sanju Thomas ]
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I would like to know how to specify for datasources the equivalent of "capacityIncrement" found in Weblogic servers.

Chandra
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
There is a way for creating Connection pool by specifying the connection manager JBossManagedConnectionPool in jboss-service.xml, but how do we map this pool to the datasource mentioned in the <database>-ds.xml

thanks.
Prashanth
[ May 12, 2005: Message edited by: prashanth c n ]
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Yes, you can specify the max pool size and min pool size in the xxxx-ds.xml file.

You need to include two more elements in xxxx-ds.xml file,

<max-pool-size>50</max-pool-size>
<min-pool-size>10</min-pool-size>
 
prashanth nagaraj
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
How do we get the dtd for that?

If I can get that, I will study that and want to know what else we can add in <Database>-ds.xml

thanks,
prashant
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
All dtds' and example xxxx-ds.xml files are available in the JBOSS_HOME/doc directory.
 
P Chandrasekaran
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

Originally posted by prashanth c n:
There is a way for creating Connection pool by specifying the connection manager JBossManagedConnectionPool in jboss-service.xml, but how do we map this pool to the datasource mentioned in the <database>-ds.xml

thanks.
Prashanth

[ May 12, 2005: Message edited by: prashanth c n ]



But am I corrrect in stating that a DataSource is by default a connection pool?

Chandra
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Yes, you are correct.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,

Thanks Sanju. I got all your points. I need some more help regarding Hibernate.

Currently I am using connection pooling with Hibernate's c3p0 API. I want to ask that how can I use JBoss connection pooling support in place of c3p0. Please explain the configuration required for this.

@All: I will also appreciate if someone other can also help me.

Thanks
Vinod Pandey
Software Engg.
NHST, India
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Vinod, welcome to Java Ranch!

Rather than resurrecting a 6 year old thread, it would be better if you started a new thread and post the complete details regarding the issue you are facing.
TellTheDetails
    Bookmark Topic Watch Topic
  • New Topic