WebSphere AppServer 5 datasource sharing question - Websphere

This is a discussion on WebSphere AppServer 5 datasource sharing question - Websphere ; I have an old jdbc application that needs to be ported to run in WebSphere App server. The application used to use a database configuration file, but for security reasons, this is no longer allowed so I decided to use ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: WebSphere AppServer 5 datasource sharing question

  1. WebSphere AppServer 5 datasource sharing question

    I have an old jdbc application that needs to be ported to run in
    WebSphere App server. The application used to use a database
    configuration file, but for security reasons, this is no longer
    allowed so I decided to use a datasource. When I did, I immediately
    noticed that WebSphere was complaining in my log files about
    "J2CA0086W: Shareable connection MCWrapper.....
    State:STATE_TRAN_WRAPPER_INUSE".

    Like a good little programmer I looked it up and found that WebSphere
    is complaining about the application's use of database connections.
    It seems that the application is opening multiple connections at the
    same time instead of the Open-Use-Close model.

    I noticed that that some others getting this message were able to
    pacify WebSphere by changing the datasource to 'unshareable'. My
    first question is: How to do that? When I set the datasources 'res-
    sharing-scope' in my Web.xml to "Unshareable", WebSphere still
    complains about a "Shareable connection". Is there some other place
    to configure that? How do I make my datasource unshareable (without
    using WSAD)? I'd like to at least try that before I redesign the
    database connection code.

    Any help or advice?

  2. Re: WebSphere AppServer 5 datasource sharing question

    On Jun 20, 4:47*pm, mark.grims...@gmail.com wrote:
    > I have an old jdbc application that needs to be ported to run in
    > WebSphere App server. *The application used to use a database
    > configuration file, but for security reasons, this is no longer
    > allowed so I decided to use a datasource. *When I did, I immediately
    > noticed that WebSphere was complaining in my log files about
    > "J2CA0086W: Shareable connection MCWrapper.....
    > State:STATE_TRAN_WRAPPER_INUSE".
    >
    > Like a good little programmer I looked it up and found that WebSphere
    > is complaining about the application's use of database connections.
    > It seems that the application is opening multiple connections at the
    > same time instead of the Open-Use-Close model.
    >
    > I noticed that that some others getting this message were able to
    > pacify WebSphere by changing the datasource to 'unshareable'. *My
    > first question is: How to do that? *When I set the datasources 'res-
    > sharing-scope' in my Web.xml to "Unshareable", WebSphere still
    > complains about a "Shareable connection". *Is there some other place
    > to configure that? *How do I make my datasource unshareable (without
    > using WSAD)? I'd like to at least try that before I redesign the
    > database connection code.
    >
    > Any help or advice?


    Hi Mark,
    The shareable property is not standard in j2ee technology, thats why
    you need to set it manually in wsad or in the extension files in
    websphere once you have deployed your app.
    Try to check for this settings in jdbc configuration within the
    websphere admin console:
    - Min number of connections for the datasource
    - Size of the connection pool
    - Connection timeout
    Check if the min connections are far more than the ones you need. also
    check for the connection pool size and optimize the release of
    connection by checking the connection timeout and comparing it with
    the database connection timeout and also with any firewall tcp timeout
    that might be between was and db.

    best regards.

+ Reply to Thread