[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2863) EntityStore assumes entity manager is named "entityManager"

Daniel Roth (JIRA) jira-events at lists.jboss.org
Wed May 7 04:27:19 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2863?page=comments#action_12411979 ] 
            
Daniel Roth commented on JBSEAM-2863:
-------------------------------------

Oh, sorry. 2.0.2.CR2. The fix mentioned in the forum reference thread fixes the issue. (or using the default entityManager name)

There is a nullpointer in EntityLoader (getPersistenceContext().isOpen()) which comes from this code returning null. getPersistenceContextName()  returns (hard-coded) "entityManager". 

PersistenceController.java

   public T getPersistenceContext()
   {
      if (persistenceContext==null)
      {
         persistenceContext = (T) getComponentInstance( getPersistenceContextName() );
      }
      return persistenceContext;
   }

EntityLoader.java
   @Override
   protected String getPersistenceContextName()
   {
      return "entityManager";
   }





> EntityStore assumes entity manager is named "entityManager"
> -----------------------------------------------------------
>
>                 Key: JBSEAM-2863
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2863
>             Project: Seam
>          Issue Type: Bug
>    Affects Versions: 2.0.2.CR1
>            Reporter: Clint Popetz
>         Assigned To: Pete Muir
>            Priority: Critical
>             Fix For: 2.0.2.CR2, 2.1.0.BETA1
>
>
> EntityLoader is returning a hardcoded string for the name of the persistenceContext component, which is making s:convertEntities fail for SMPCs that aren't named "entityManager," and the documented way to handle this:
> <component name="org.jboss.seam.ui.EntityConverter">
>         <property name="entityManager">#{yourEM}</property>
>     </component>
> is no longer sufficient.

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

        



More information about the seam-issues mailing list