[jboss-jira] [JBoss JIRA] Closed: (JBRULES-2593) JPAKnowledgeServiceBean does not initialize JPAKnowledgeFactoryService

Mark Proctor (JIRA) jira-events at lists.jboss.org
Mon Jul 26 16:50:34 EDT 2010


     [ https://jira.jboss.org/browse/JBRULES-2593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Proctor closed JBRULES-2593.
---------------------------------



> JPAKnowledgeServiceBean does not initialize JPAKnowledgeFactoryService
> ----------------------------------------------------------------------
>
>                 Key: JBRULES-2593
>                 URL: https://jira.jboss.org/browse/JBRULES-2593
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: All
>    Affects Versions: 5.1.0.CR1
>         Environment: N/A
>            Reporter: Anatoly Polinsky
>            Assignee: Mark Proctor
>             Fix For: 5.1.0.FINAL
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> private JPAKnowledgeFactoryService                           jpaKnowledgeServiceProvider;
> in "JPAKnowledgeServiceBean" is not initialized. It used to be by:
>     protected void initDao() {
>         ...  ...  ...
>         jpaKnowledgeServiceProvider = node.get( JPAKnowledgeFactoryService.class );
>         if ( jpaKnowledgeServiceProvider instanceof JPAKnowledgeProviderLocalClient ) {
>             JPAKnowledgeProviderLocalClient local = (JPAKnowledgeProviderLocalClient) jpaKnowledgeServiceProvider;
>             local.setCommandServiceClass( SpringSingleSessionCommandService.class );
>         } else {
>             throw new RuntimeDroolsException( "JPAKnowledgeService is not instance of: " + JPAKnowledgeProviderLocalClient.class.getName() );
>         }
>     }
> but now this code is commented out [ in the latest SNAPSHOT as well ]. Therefore both:
>     public StatefulKnowledgeSession newStatefulKnowledgeSession() {}
> and
>     public StatefulKnowledgeSession loadStatefulKnowledgeSession(final int sessionId) {}
> FAIL, since they use jpaKnowledgeServiceProvider to create / load Sessions:
>          return jpaKnowledgeServiceProvider.newStatefulKnowledgeSession..
>          return jpaKnowledgeServiceProvider.loadStatefulKnowledgeSession..
> -------------------------------------------------------------------------------------------------------------------
> I understand "SpringSingleSessionCommandService" was removed, but this is not the reason to document the whole thing as it breaks the code base that depends on it.
> -------------------------------------------------------------------------------------------------------------------
> If "JPAKnowledgeServiceBean" is deprecated, or a different configuration required, please advise. Is it documented?
> Thank you,
> /Anatoly
>  
> Exception to be indexed by Google:
> java.lang.NullPointerException
> 	at org.drools.container.spring.beans.persistence.JPAKnowledgeServiceBean$1$1.doInJpa(JPAKnowledgeServiceBean.java:42)
> 	at org.drools.container.spring.beans.persistence.JPAKnowledgeServiceBean$1$1.doInJpa(JPAKnowledgeServiceBean.java:41)
> 	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:183)
> 	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:146)
> 	at org.drools.container.spring.beans.persistence.JPAKnowledgeServiceBean$1.doInTransaction(JPAKnowledgeServiceBean.java:40)
> 	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
> 	at org.drools.container.spring.beans.persistence.JPAKnowledgeServiceBean.newStatefulKnowledgeSession(JPAKnowledgeServiceBean.java:38)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list