[ 
https://issues.apache.org/jira/browse/OPENJPA-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258830#comment-13258830
 ] 

Mark Struberg commented on OPENJPA-2139:
----------------------------------------

Hi Heath!

Txs for doing a review and provide additional work. I just came back from a 
conference and hope I can test your patch early next week. Just looked at your 
patch quickly but need to take more time to grok the details.

Just to be sure that we aim into the same direction:

a.) aborting the app in case a DB is not available is NOT an option. It is a 
standard case in big apps that the db is not always available. E.g on cluster 
failover (cold standby) the app needs to continue after the db is back up again.

b.) there are quite a few different scenarios we need to take care
  1.) build-time enhancement
  2.) runtime enhancement
  3.) subclassing enhancement
  4.) configuration via PersistenceUnitInfo vs persistence.xml
   etc. Please add other testing scenarios where this could have an impact. In 
our app we use build-time enhancement.

c.) I'm not sure if connecting-for-dictionary-failed is practicable. It's imo 
not if you have to deal with multiple databases depending on the installation.

d.) we must be careful to not introduce a chicken-egg problem ;)

                
> OpenJPA fails to recover from a broken database on startup
> ----------------------------------------------------------
>
>                 Key: OPENJPA-2139
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2139
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>            Priority: Critical
>             Fix For: 2.3.0
>
>         Attachments: OPENJPA-2139-1.2.x.patch, OPENJPA-2139.mdr.patch, 
> OPENJPA-2139.patch
>
>
> The following scenario:
> 1.) turn off the database
> 2.) perform a query against the database
> 3.) turn on the database
> 4.) try to re-run the query from 2.)
> In 4.) you will get the following Exception:
> openjpa-2.2.0-r422266:1244990 nonfatal user error> 
> org.apache.openjpa.persistence.ArgumentException: An error occurred while 
> parsing the query filter "SELECT k FROM DbEnumKey AS k where k.type=:typ 
> ORDER BY k.ordinal". Error message: The name "DbEnumKey" is not a recognized 
> entity or identifier. Known entity names: []
> Basically the whole app is stale afterwards!
> Solution: caching the entities might only be done if a connection can be 
> established.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to