Discussion:
[Middlegen-user] Middlegen, XDoclet, MySQL, and JBoss
Steve Knight
2002-02-07 14:27:01 UTC
Permalink
Aslak, maybe you can help me out here.
I have been trying out the latest CVS of middlegen to generate my Entity
beans with a simple 1-n relationship between Parent and Child tables.
Here are some of the problems I encountered:

i) When I ran my middlegen-created source through XDoclet(CVS from last
night), it didn't create the proper <ejb-name>Child</ejb-name> under the
<relationship-role-source> in the ejb-jar.xml. It simply created a blank
<ejb-name></ejb-name>. Here is the code that Middlegen created for the
relationship section:

/**
* @ejb:interface-method view-type="local"
* @ejb:relation
* name="parent-child"
* role-name="one-parent-has-many-child"
* target-ejb="Child"
* target-role-name="children-ownedby-parent"
*
* @weblogic:relation
* foreign-key-column="parentid"
* key-column="parentid"
*
*/
public abstract java.util.Collection getChilds();

Is this correct? Should the proper code be generated from Xdoclet...or is
this an XDoclet problem?

2)The EJB-QL generated by middlegen is not compatible with JBoss 3.0a. It
seems to want the full query statement. I will try again with the latest
CVS of JBoss...maybe it works now.

I had a few other issues with XDoclet that were JBoss related, but nothing
insurmountable.
After I tweaked and fixed-up the code it finally deployed on JBoss, but I
was hoping that I wouldn't have to do this for every set of beans I create.

I know you are probably busy working on integrating middlegen with the
XDoclet gui project...how is that coming along? When can we expect a
functioning version to be available?

Thanks for the help, and keep up the excellent work!

Steve Knight



_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
a***@netcom.no
2002-02-07 17:03:05 UTC
Permalink
Hi,

Middlegen has fallen a little bit behind after the latest XDoclet
enhancements. In particular, the old @weblogic:relation tag from 1.1.1 is
now split into @weblogic:relation and @weblogic:column-map, which breaks
compatibility. Middlegen should be used with XDoclet 1.1 until I turn around
and fix this.
-----Original Message-----
Knight
Sent: 7. februar 2002 17:21
Subject: [Middlegen-user] Middlegen, XDoclet, MySQL, and JBoss
Aslak, maybe you can help me out here.
I have been trying out the latest CVS of middlegen to generate my Entity
beans with a simple 1-n relationship between Parent and Child tables.
i) When I ran my middlegen-created source through XDoclet(CVS from last
night), it didn't create the proper <ejb-name>Child</ejb-name> under the
<relationship-role-source> in the ejb-jar.xml. It simply created a blank
<ejb-name></ejb-name>. Here is the code that Middlegen created for the
There has been a couple of XDoclet relation related bugs recently:
http://sourceforge.net/tracker/?func=detail&atid=402704&aid=514180&group_id=
31602 (open, assigned to me)
http://sourceforge.net/tracker/?func=detail&atid=402704&aid=514022&group_id=
31602 (closed)
/**
* name="parent-child"
* role-name="one-parent-has-many-child"
* target-ejb="Child"
* target-role-name="children-ownedby-parent"
*
* foreign-key-column="parentid"
* key-column="parentid"
*
*/
public abstract java.util.Collection getChilds();
Is this correct? Should the proper code be generated from
Xdoclet...or is
this an XDoclet problem?
2)The EJB-QL generated by middlegen is not compatible with JBoss
Could you supply some sample EJB-QL that would work for JBoss then?
3.0a. It
seems to want the full query statement. I will try again with the latest
CVS of JBoss...maybe it works now.
I had a few other issues with XDoclet that were JBoss related,
but nothing
insurmountable.
After I tweaked and fixed-up the code it finally deployed on JBoss, but I
was hoping that I wouldn't have to do this for every set of beans
I create.
I know you are probably busy working on integrating middlegen with the
XDoclet gui project...how is that coming along? When can we expect a
functioning version to be available?
No idea. Hopefully in a week or so, but no promises. I'm currently
refactoring Middlegen to use XDoclet's template engine for code generation,
so that it's easier to customise the generated code. Another thing I'm
looking at is to separate the Middlegen GUI from the core JDBC/Code
generation engine, to make Middlegen scriptable (so it can be invked from
e.g. Ant).
Thanks for the help, and keep up the excellent work!
Thanks for your comments.
Steve Knight
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Steve Knight
2002-02-07 20:10:27 UTC
Permalink
Actually, I am not concerned with Weblogic tags as I am only using JBoss.
The code sample that I provided had the weblogic tags because I didn't
bother to remove them.
But it still should have generated the proper tag for <ejb-name> within the
relationship section of the ejb-jar.xml file. Do you know if this is the
fault of XDoclet? Or did middlegen not specify the proper tags for use in
XDoclet?
Maybe if I include the @jboss-relation tag, that will create the proper tags
in the jbosscmp-jdbc.xml file which overrides the ejb-jar.xml?
But still, I would like XDoclet to create a properly formatted, and portable
ejb-jar.xml.

Thanks for the help!

Steve Knight



----- Original Message -----
From: <***@netcom.no>
To: "Steve Knight" <***@hotmail.com>;
<middlegen-***@lists.sourceforge.net>
Sent: Thursday, February 07, 2002 2:02 PM
Subject: RE: [Middlegen-user] Middlegen, XDoclet, MySQL, and JBoss


Hi,

Middlegen has fallen a little bit behind after the latest XDoclet
enhancements. In particular, the old @weblogic:relation tag from 1.1.1 is
now split into @weblogic:relation and @weblogic:column-map, which breaks
compatibility. Middlegen should be used with XDoclet 1.1 until I turn around
and fix this.
-----Original Message-----
Knight
Sent: 7. februar 2002 17:21
Subject: [Middlegen-user] Middlegen, XDoclet, MySQL, and JBoss
Aslak, maybe you can help me out here.
I have been trying out the latest CVS of middlegen to generate my Entity
beans with a simple 1-n relationship between Parent and Child tables.
i) When I ran my middlegen-created source through XDoclet(CVS from last
night), it didn't create the proper <ejb-name>Child</ejb-name> under the
<relationship-role-source> in the ejb-jar.xml. It simply created a blank
<ejb-name></ejb-name>. Here is the code that Middlegen created for the
There has been a couple of XDoclet relation related bugs recently:
http://sourceforge.net/tracker/?func=detail&atid=402704&aid=514180&group_id=
31602 (open, assigned to me)
http://sourceforge.net/tracker/?func=detail&atid=402704&aid=514022&group_id=
31602 (closed)
/**
* name="parent-child"
* role-name="one-parent-has-many-child"
* target-ejb="Child"
* target-role-name="children-ownedby-parent"
*
* foreign-key-column="parentid"
* key-column="parentid"
*
*/
public abstract java.util.Collection getChilds();
Is this correct? Should the proper code be generated from
Xdoclet...or is
this an XDoclet problem?
2)The EJB-QL generated by middlegen is not compatible with JBoss
Could you supply some sample EJB-QL that would work for JBoss then?
3.0a. It
seems to want the full query statement. I will try again with the latest
CVS of JBoss...maybe it works now.
I had a few other issues with XDoclet that were JBoss related,
but nothing
insurmountable.
After I tweaked and fixed-up the code it finally deployed on JBoss, but I
was hoping that I wouldn't have to do this for every set of beans
I create.
I know you are probably busy working on integrating middlegen with the
XDoclet gui project...how is that coming along? When can we expect a
functioning version to be available?
No idea. Hopefully in a week or so, but no promises. I'm currently
refactoring Middlegen to use XDoclet's template engine for code generation,
so that it's easier to customise the generated code. Another thing I'm
looking at is to separate the Middlegen GUI from the core JDBC/Code
generation engine, to make Middlegen scriptable (so it can be invked from
e.g. Ant).
Thanks for the help, and keep up the excellent work!
Thanks for your comments.
Steve Knight
_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...