0 Replies Latest reply on Jan 8, 2007 9:59 AM by erahamim

    datasource pool is alocated twice

    erahamim Newbie

      I'm using jboss 4.0.5. I have XA datasource with oracle 10 as database. I init my application using a start up servlet. In the init method of the servlet I do some queries to database which are done ok. Then in the first time that I try to get a database connection using stateless ejb I see that the jboss is allocate the pool again.

      So even that my data source is defined in oracle-xa-ds.xml

      I can see in the JCA jmx JBossManagedConnectionPool that
      AvailableConnectionCount - 80
      ConnectionCount - 20
      MinSize - 10
      MaxSize - 40

      Before getting the connection from ejb
      AvailableConnectionCount 40
      ConnectionCount is 10.
      MinSize - 10
      MaxSize - 40

      I always get the connection in the same way
      (DataSource) ic.lookup("java:/DataSourceDS").getConnection();
      The different is the context that I come from, servlet or ejb.

      Any idea?

      My full data source definition is:

      <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION= (ADDRESS_LIST=(LOAD_BALANCE=on) (ADDRESS=(PROTOCOL=TCP)(HOST= (ADDRESS=(PROTOCOL=TCP)(HOST=</xa-datasource-property>
      <xa-datasource-property name="User">user</xa-datasource-property>
      <xa-datasource-property name="Password">password</xa-datasource-property>