>From Mike (separate e-mail thread)...

Another property to check is the openjpa.ConnectionRetainMode property,
which controls how long OpenJPA will hold on to a connection. If you haven't
changed the value of that property then we should obtain a connection only
when needed [1]. If it's been changed to "always" or "transaction" then this
error makes more sense

[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_dbsetup_retain

HTH
-mike

On Thu, Feb 12, 2009 at 8:27 AM, Kevin Sutter <[email protected]> wrote:

> On Thu, Feb 12, 2009 at 2:00 AM, <[email protected]> wrote:
>
>> Hello everybody,
>>
>> I'm having some problems configuring openJPA inside the Websphere
>> Application Server 6.1. I'm optaining a EntityManager manually from the
>> EnitityManagerFactory, though it seems that after some time, the
>> connection is lost and I get the following exception when trying to access
>> data:
>
>
> Are you using vanilla WebSphere v6.1?  Or, are you using the EJB3 Feature
> Pack on top of v6.1?  When you indicate a manual process of obtaining an EMF
> and EM, I'm assuming vanilla WAS.  But, it would be good to get
> clarification.
>
> What datasource configuration are you using?  Are you attempting to use a
> <jta-data-source>, <non-jta-data-source>, or the openjpa.Connection*
> properties?  If you are using a <non-jta-data-source>, you may need
> additional changes on top of vanilla WAS v6.1 to prevent the automatic
> enlistment of the datasource in the current transaction.  But, that
> situation is normally discovered by an enlistment error and not this reset
> error.
>
> The other thing I would check on is whether your EM's are probably managed
> from a lifecyle perspective.  When you are using application-managed
> persistence, this lifecycle is left up to you.  I'm wondering whether you
> may be using up all of your database resources.  What database are you
> using?  Can you monitor the resources used by your database to see if you
> might be exceeding the limits or defaults set up for the database?
>
> A few things to check on.  Good luck.
> Kevin
>
>
>>
>> openjpa-1.0.3-SNAPSHOT-r420667:649224 nonfatal general error>
>> org.apache.openjpa.persistence.PersistenceException: Io exception:
>> Connection reset {prepstmnt 465836996 SELECT ....]} [code=17002,
>> state=08006]
>>    at
>>
>> org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3951)
>>    at
>> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:97)
>>    at
>> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:83)
>>    at
>> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:59)
>>    at
>>
>> org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:155)
>>    at
>> org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:40)
>>    at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1223)
>>    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
>>    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:842)
>>    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:773)
>>    at
>>
>> org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
>>    at
>> org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:237)
>>    at
>> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:277)
>>
>> My questions here are:
>>
>> 1. Is there a way to check ahead whether a connection is still valid and
>> existing?
>> 2. Is there anything that can be configured to let JPA automatically check
>> for valid connections?
>> 3. What would be the best way to reactivate a reset connection?
>>
>> Thank you very much,
>>
>> Heiko
>>
>> If you are not the intended addressee, please inform us immediately that
>> you have received this e-mail in error, and delete it. We thank you for your
>> cooperation.
>
>
>

Reply via email to