- This topic has 10 replies, 7 voices, and was last updated 18 years, 4 months ago by Erb Ferenc.
-
AuthorPosts
-
aminlaljiMemberI 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
Riyad KallaMemberI asked our Xdoclet guy to take a look at this.
GregMemberPlease 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/
kklickerMemberHi-
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.
GregMemberTo 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.
Richard EberhardtParticipant@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?
ThanksI 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
Richard EberhardtParticipantOK.
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?
oscheiMemberI have the same problem. Does anyone knows the answer?
Regards
Oliver
oscheiMemberProblem solved.
GregMemberRich,
Does the followup given by Oliver in this thread help you out any?
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-9974.html
Erb FerencParticipantHi!
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!
-
AuthorPosts