facebook

XDoclet merge point for not working…

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #197812 Reply

    ErikEngerd
    Member

    Hi,

    I am trying to use a merge point for merging in an <ejb-refs> section in the ejb-jar.xml file.

    I have configured the ‘mergedir’ property to be the same as the directory where my java sources reside. Underneath this directory, my session bean code is in a package/directory mybeans/session. In this same directory I have created a file ejb-ejbrefs-StatefulSession.xml containing the <ejb-refs> section to be merged in. “StatefulSession” is also the name of my session bean as indicated in the ‘@ejb.bean name’ tag in
    the code for my session bean. The java class for the session bean has a different name.

    XDoclet generation does not merge in the file and I get insufficient information from XDoclet to trace down the problem (‘verbose=true’ is already switched on in the ejbdoclet configuration).

    What am I doing wrong?

    Cheers
    Erik

    #197817 Reply

    ErikEngerd
    Member

    – OS: windows XP home
    – Eclipse: Version: 2.1.1 Build id: 200306271545
    Fresh install with MyEclipse as only plugin.
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*: Answer 7
    – MyEclipse version: 2.5.1
    – App server: JBoss 3.2
    – Eclipse Java version 1.4.2-b20
    – JBoss Java version 1.4.2-b20

    #197819 Reply

    Scott Anderson
    Participant

    Erik,

    As far as using the mergeDir goes, we just posted a new tutorial for web development with XDoclet that uses this feature. Perhaps reading through it will help you through the issue.

    However, before worrying about the mergeDir issue, did you have XDoclet configured and working properly to generate your interface classes and descriptors already? If not, I’d take a step back and make sure you can configure it properly and run it successfully at that level before taking on the additional complexity of the merge directory.

    If you’re just adding EJB refs, is there some reason you can’t just use the @ejb.ejb-ref tag to get them generated for you?

    Also, the default settings for XDoclet don’t quite respect the project settings yet so be sure and check the destDir and fileSet properties at least.

    –Scott
    MyEclipse Support

    #197823 Reply

    ErikEngerd
    Member

    Hi,

    somehow my reply got lost.

    I am starting based on a working example with two session beans.
    I am aware of the solution with XDoclet tags in the source code but am using merge points because it provides greater flexibility.

    I am learning J2EE so want to get to know J2EE and get MyEclipseWorkbench to do exactly what I want.

    The example on the web did not provide much additional information. Also, putting the xml file in the mergedir itself does not provide any information. All properties are set. How do I get XDoclet to give more information about what it is doing?

    Cheers
    Erik

    #197827 Reply

    Scott Anderson
    Participant

    Erik,

    Got your project via email and will give it a look.

    –Scott
    MyEclipse Support

    #197847 Reply

    Scott Anderson
    Participant

    Erik,

    The problem with the project you sent me was only that the merge file was misnamed. It must be named to match the source file, not the name you have the ejb in the bean tag. So, just change ejb-ejbrefs-StatelessSession.xml to ejb-ejbrefs-StatelessSessionBean.xml and it will work fine.

    By the way, you just received about $250 in free analysis, so if you haven’t already subscribed I’m counting on seeing your $30 shortly. 😉

    –Scott
    MyEclipse Support

    #197849 Reply

    ErikEngerd
    Member

    Hi Scott,

    Thanks for your reply. It’s working now. Very strange however because I remember also having tried your suggestion before.

    What I think would be a useful addition is a graphical user interface for configuring EJBs in addition to the general XDoclet configuration. As a user, I would like to view all EJBs in a certain project, right-click on an EJB (or an an EJB source file) and say things like ‘add ejb-refs section’. Also, it would be nice if there was a GUI for editing the XML files or – at least – code completion. The current approach can be quite troublesome because XDoclet provides almost no information about what it is doing.

    Many thanks for the $250 in free analysis. I have already subscribed a few days ago because it is already clear to me that MyEclipseWorkbench will save me a lot of time.

    I will also post some suggestions on the Xdoclet mailing list to make sure this type of problem is easier to debug.

    Cheers
    Erik

    #197850 Reply

    Scott Anderson
    Participant

    Erik,

    Thanks for your reply. It’s working now.
    Many thanks for the $250 in free analysis. I have already subscribed a few days ago because it is already clear to me that MyEclipseWorkbench will save me a lot of time.

    You’re certainly welcome. I didn’t really mind doing it since it forced me to dig into the mergeDir feature, which I’ve never used before.

    Also, it would be nice if there was a GUI for editing the XML files or – at least – code completion.

    We’re looking into upgrading the XML editor soon. We agree that it could certainly use improvement.

    The current approach can be quite troublesome because XDoclet provides almost no information about what it is doing.
    I will also post some suggestions on the Xdoclet mailing list to make sure this type of problem is easier to debug.

    I noticed the same thing. Thanks for making the suggestion to them to add some debug support.

    Many thanks for the $250 in free analysis. I have already subscribed a few days ago because it is already clear to me that MyEclipseWorkbench will save me a lot of time.

    Excellent. Always glad to help a subscriber. 🙂

    –Scott
    MyEclipse Support

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: XDoclet merge point for not working…

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