- This topic has 6 replies, 5 voices, and was last updated 19 years, 7 months ago by Scott Anderson.
-
AuthorPosts
-
Diane PowersMemberI am using:
myeclipse 3.8.2
eclipse 3.0.1
sun 8 app serverHaving problems with @sunone tags?
My question is, on any unidirectional relation it seems as though the @sunone tags will always put the relation in both beans in the sun-cm-mappings.xml file?
Is there a patch to xdoclet? If so explain how I would install it into myeclipse.
Thanks,
Diane
Riyad KallaMemberI’ll check with our XDoclet guy.
GregMemberDiane,
Does this xdoclet PR correctly describe your problem?
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-604If it does, it looks like this problem is still unresolved. You can watch the XDoclet PR and if it get fixed in a future release you can upgrade the xdoclet libraries in MyEclipse. Once you download the new xdoclet library release, follow the steps in the MyEclipse User Guide topic: Getting Started->XDoclet Overview->XDoclet Core->Updating XDoclet Modules to upgrade the MyEclipse xdoclet libraries.
Diane PowersMemberThanks a bunch Greg. Yes that is it.
Diane
Diane PowersMemberI forgot one thing though. It is on sun 8 not 7.
jfraneyMemberI hit this problem hard, before I met MyEclipse, or any IDE that helped with xdoclet. In that project, I inserted all the xdoclet markup by hand (not just the sunone tags, but everything else, too.) An IDE that inserts these things is an attraction to me.
I looked into the source code of xdoclet to resolve, but I found a very high hurdle. It seems the semantics of its internal API doesn’t support the conditions required. I don’t remember the details, this was a few months back, so I hope you would bear with me. If the API supported it, the right fix would have been to modify the template code for the sunone markup. In xdoclet, the templates provide the rules for code/xml generation: modify a template and different code/xml would be generated.
That leads me to the first suggestion for xdoclet extension in MyEclipse. Please enable (or keep enabling) the programmer to modify xdoclet templates. I’m still new to MyEclipse so I don’t know what the current accessibility is, but if I needed a different code gen, like maybe in a value-object generation, I should be able to edit existing or introduce a new xdoclet template into the MyEclipse xdoclet step. [Xdoclet also has a ‘merge point’ extension functionality which MyEclipse should not obstruct, but these allow for extension only in ways that was forseen by the template implementor.]
Anyway, the workaround to the above for me was to generate the sun-cmp-mapping.xml file from a build, copy and edit it by hand to be correct. This correct version I held to the side and included in the deployment EJB jar. The sun-cmp-mapping.xml file that was created on every build was not deployed; xdoclet wrote it out on every build, but it was ignored, replaced by the correct version.
Another work around that might work, is to break out the sunone xdoclet task from the other xdoclet tasks. Then, the correct sun-cmr-mapping file could be safe because the sunone xdoclet task isn’t run on every build.
Both of these workarounds are not useful during times that the field binding or the relationships change frequently with respect to builds. If your project is in a stage where the database schema or your entity beans are still evolving, either of these approaches will get tiresome too soon.
I still don’t know enough about MyEclipse, but hopefully no IDE would get in the way of either of the above work arounds. I hope I could either: 1) turn off sunone xdoclet task after I have a correct sun-cmp-mapping.xml file, or 2) point to a different sun-cmp-mapping.xml file for deploy (instead of the one that is code generated). The idea is to manage the file manually, but take advantage of at least one iteration of the xdoclet generation of the file.
Thanks,
John
Scott AndersonParticipantJohn,
Thanks for the detailed followup. MyEclipse should not interfere with the workarounds you listed and it’s trivial to configure XDoclet not to generate the Sun descriptor once you’ve gotten one you wanted. You simply have to remove it from the XDoclet configuration of the project.
-
AuthorPosts