Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Global connection pool

The sort of connection pool is not the issue I think.

The issue is how to make all webapps share the same pool.

 

I will be using oracle UCP, and present I have this config in jetty.xml :

 

<New id="cf" class="org.eclipse.jetty.plus.jndi.Resource"> 

                <Arg></Arg>

  <Arg>jdbc/MYDB</Arg>

    <Arg>

     <New class="oracle.ucp.jdbc.PoolDataSourceImpl">

                                   <Set name="connectionFactoryClassName">oracle.jdbc.pool.OracleDataSource</Set> 

                                   <Set name="user">usr</Set> 

                                   <Set name="password">pwd</Set> 

                                   <Set name="URL">jdbc:oracle:thin:@//mydb:1521/MYDB </Set>                   

      </New>

    </Arg>

  </New>

 

 

But all my webapps makes its own instance of the pool.

In my servlets I do a jndi lookup, like this :

Context ctx = new InitialContext();

dataSource = (DataSource) ctx.lookup("jdbc/MYDB ");

 

 

/ Per Jørgen

 

 

From: jetty-users-bounces@xxxxxxxxxxx [mailto:jetty-users-bounces@xxxxxxxxxxx] On Behalf Of Joakim Erdfelt
Sent: 3. november 2015 16:01
To: JETTY user mailing list
Subject: Re: [jetty-users] Global connection pool

 

Uhm ... 

 

What sort of "connection pool" are we referring to here?  (There are many kinds)


Joakim Erdfelt / joakim@xxxxxxxxxxx

 

On Tue, Nov 3, 2015 at 7:11 AM, Per Jørgen Vigdal <Per.Jorgen.Vigdal@xxxxxxxx> wrote:

Hi

 

How can I configure jetty 9 in a way that webapps share one global connection pool.

 

 

Thank you

Per Jørgen.

 


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


Back to the top