[forge-issues] [JBoss JIRA] (FORGE-617) Cannot access Stateful EJB from inner anonymous class

Luca Masini (JIRA) jira-events at lists.jboss.org
Wed Aug 1 10:52:07 EDT 2012


    [ https://issues.jboss.org/browse/FORGE-617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709185#comment-12709185 ] 

Luca Masini commented on FORGE-617:
-----------------------------------

Hi all, I'm trying to deploy the generated Java EE 6 application under several application servers.
 
Now under Weblogic 12c I've some problems. One of this is that in the generated code we have the JSF Converter:
 
      return new Converter()
      {
 
 
         @Override
         public Object getAsObject(FacesContext context, UIComponent component, String value)
         {
 
 
            return MyWonderfulBean.this.getAsObject(value);
         }
 
But when JSF tries to execute and use it an IllegalStateException: "Extended Persistence Contexts can only be invoked from within the context of the stateful session bean that declares the Extended Persistence Context." is raised.
 
I think that WLS is right, but I want your opinion. Infact accessing the "this" object we don't have the EJB object but only the plain Java Bean that implements it, and this is not the desidered Stateful EJB.
 
I tried to use the SessonContext to grab the EJB Object, but without a Local interface this is not allowed.
 
So I solved implementing the Converter interface directly from the EJB and passing the EJB to the JSF page:
 
<h:selectOneMenu converter="#{myWonderfulBean......
 
I forked Forge 1.0.6-SNAPSHOT (https://github.com/masini/core) and now I'll try to correct it, from the generated EJB to the scaffolded JSF, and I would like your opinion about it.

Thank you.

                
> Cannot access Stateful EJB from inner anonymous class
> -----------------------------------------------------
>
>                 Key: FORGE-617
>                 URL: https://issues.jboss.org/browse/FORGE-617
>             Project: Forge
>          Issue Type: Bug
>          Components: Java EE APIs
>            Reporter: Luca Masini
>


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

        


More information about the forge-issues mailing list