facebook

Entity Facade…

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #204245 Reply

    aminlalji
    Member

    I am trying to have MyEclipse generate an Entity Facade (by specifying @ejb.facade view-type=”local” ) in my EntityBean class…

    I run xdoclet, and a EntityBeanFacadeEJB is generated (at this point no other related classes get generated)… I manually edit the EntityBeanFacadeEJB and dump the xdoclet headers (this allows the file to be picked up for the next xdoclet build)

    /*
    * Generated by XDoclet – Do not edit!
    * this class must be processed by xdoclet in the second run!!!!
    */

    /* Session facade for UserBean.
    * @xdoclet-generated at ${TODAY}
    * @copyright The XDoclet Team
    * @author XDoclet
    * @version ${version}
    */

    I then rerun xdoclet, and the rest of the related classes get generated (FacadeSession, FacadeLocal, FacadeLocalHome)… the problem is upon deployment, JBOSS complains about the Local Interface violating EJB Spec because the generated methods in the LocalHome throw RemoteExceptions…

    any ideas?
    Thanks

    #210652 Reply

    Riyad Kalla
    Member

    I asked our Xdoclet guy to take a look at this.

    #210689 Reply

    Greg
    Member

    Please check to see if the xdoclet solution in the following topic fixes your problem:

    https://www.genuitec.com/forums/topic/ejb-session-bean-using-xdoclet-under-jboss-3-2-4-closed/

    #218339 Reply

    kklicker
    Member

    Hi-

    I am completely new to this forum, and I notice there aren’t any follow-ups since July, but since I am having a similar problem, thought I would jump in here.

    I followed the link above and read the thread, and I don’t think this is the problem. I have similar classes that ARE in a directory with “.ejb” at the end of the package name, and I still have this trouble.

    Could it be that there is a bug in XDoclet related to generating the local interface for the Session Facade pattern?

    Thanks for any info.

    #218392 Reply

    Greg
    Member

    To create the Entity facace you need to do the following:

    1) Add @ejb.facade tags to EJB class

    * @ejb.facade 
     *  type = "Stateless"
     *  transaction-type = "Container" 
     *    view-type = "local"

    2) Under the Standard EJB configuration you need to add the “entityfacade” subtask. Right click <ejbdoclet> and choose “Add”
    3) Then choose entityfacade subtask hit OK
    4) Save this configuration and re-run xdoclet.

    The Facade should be generated now.

    #234370 Reply

    Richard Eberhardt
    Participant

    @aminlalji wrote:

    I am trying to have MyEclipse generate an Entity Facade (by specifying @ejb.facade view-type=”local” ) in my EntityBean class…

    I run xdoclet, and a EntityBeanFacadeEJB is generated (at this point no other related classes get generated)… I manually edit the EntityBeanFacadeEJB and dump the xdoclet headers (this allows the file to be picked up for the next xdoclet build)

    /*
    * Generated by XDoclet – Do not edit!
    * this class must be processed by xdoclet in the second run!!!!
    */

    /* Session facade for UserBean.
    * @xdoclet-generated at ${TODAY}
    * @copyright The XDoclet Team
    * @author XDoclet
    * @version ${version}
    */

    I then rerun xdoclet, and the rest of the related classes get generated (FacadeSession, FacadeLocal, FacadeLocalHome)… the problem is upon deployment, JBOSS complains about the Local Interface violating EJB Spec because the generated methods in the LocalHome throw RemoteExceptions…

    any ideas?
    Thanks

    I am trying to use XDoclet to generate a session bean facade for an entity bean. I can get the Facade class generated (as you have noted), so I am part of the way there. But this Facade class is really a container for tags that will be used in another XDoclet run which I presume will generate the session bean interfaces. I am confused about how to accomplish the “second run” – when I re-reun XDoclet, I get what I have regenerated, which is to say no session bean interfaces.

    It sounds like you have a work-around for part of this. What do you mean by “dump the headers” and how do you accomplish the second XDoclet build?

    Also, Eclipse Support:
    1) is there a better way to do this than the method in this note?
    2) where can I find documentation on the facade tag properties used in MyEclipse?

    Thanks,

    Rich

    #234413 Reply

    Richard Eberhardt
    Participant

    OK.

    I also deleted the XDoclet headers in the …Facade class and ran XDoclet again. Now the session bean interfaces are generated.

    However, something is still missing. I am getting a syntax error on resolving a getData() method generated in the facade. The error message is coming from an attempt to compile the …FacadeEJB class.

    Can anyone help?

    #240723 Reply

    oschei
    Member

    I have the same problem. Does anyone knows the answer?

    Regards

    Oliver

    #240841 Reply

    oschei
    Member

    Problem solved.

    #241028 Reply

    Greg
    Member

    Rich,

    Does the followup given by Oliver in this thread help you out any?
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-9974.html

    #258364 Reply

    Erb Ferenc
    Participant

    Hi!

    I`m new here!

    I have a same generated getData() problem in my Entity facade! Can anybady told me, what was the solution!

    Thank`s!

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Entity Facade…

You must be logged in to post in the forum log in