Discussion:
[Middlegen-user] middlegen + value objects + {0} option in package name
Perez Pola, Jorge
2004-05-21 10:55:00 UTC
Permalink
Hi all,

I am stuck in a problem with middlegen.

I generate my ejb´s with their value objects succesfully this way :

<cmp20 destination="${build.gen-src.dir}" package="${name}.ejb" interfacepackage="${name}.ejb" jndiprefix="${unique.name}" pkclass="false" dataobject="false" valueobject="true" sessionfacade="false" viewtype="local" mergedir="${basedir}/src/middlegen" readonly="false" fkcmp="true" guid="false">

Then I try to store each ejb in a folder with its name, to do this I add the {0} to the package and interfacepackage :

<cmp20 destination="${build.gen-src.dir}" package="${name}.ejb.{0}" interfacepackage="${name}.ejb.{0}" jndiprefix="${unique.name}" pkclass="false" dataobject="false" valueobject="true" sessionfacade="false" viewtype="local" mergedir="${basedir}/src/middlegen" readonly="false" fkcmp="true" guid="false">

Then I got the problem.
It seems that middlegen does not 'translate' the {0} with the folder name in those methods that has references to value objects.

The bean has declarations that does not compile, like this :

public java.lang.String ejbCreate(ccop.ejb.{0}.UserLightValue value) throws javax.ejb.CreateException {

The template entity-cmp-20.vm is what produce the error.

My questions now are

Is it a Middlegen bug ?
Am I doing something wrong ?
Anyone running in the same problem has a solution, what ???
Am I questioning a lot ;-)?

Thanks to all that at least has read this mail,
Jorge
Eivind Waaler
2004-05-21 12:57:05 UTC
Permalink
Hey,

I noticed there was a bug in the template, I was using
$plugin.interfacePackage instead of $table.interfacePackage. This has been
corrected, if you get the latest version from cvs.

Also make sure you specify package and interfacePackage on the
sessionblock if you're using this, as this should not change with the
other bean names.

Cheers
=2Eeivind
Post by Perez Pola, Jorge
Hi all,
I am stuck in a problem with middlegen.
<cmp20 destination=3D"${build.gen-src.dir}" package=3D"${name}.ejb" inter=
facepackage=3D"${name}.ejb" jndiprefix=3D"${unique.name}" pkclass=3D"false"=
dataobject=3D"false" valueobject=3D"true" sessionfacade=3D"false" viewtype=
=3D"local" mergedir=3D"${basedir}/src/middlegen" readonly=3D"false" fkcmp=
=3D"true" guid=3D"false">
Post by Perez Pola, Jorge
Then I try to store each ejb in a folder with its name, to do this I add =
=09<cmp20 destination=3D"${build.gen-src.dir}" package=3D"${name}.ejb.{0}=
" interfacepackage=3D"${name}.ejb.{0}" jndiprefix=3D"${unique.name}" pkclas=
s=3D"false" dataobject=3D"false" valueobject=3D"true" sessionfacade=3D"fals=
e" viewtype=3D"local" mergedir=3D"${basedir}/src/middlegen" readonly=3D"fal=
se" fkcmp=3D"true" guid=3D"false">
Post by Perez Pola, Jorge
Then I got the problem.
It seems that middlegen does not 'translate' the {0} with the folder name=
in those methods that has references to value objects.
Post by Perez Pola, Jorge
public java.lang.String ejbCreate(ccop.ejb.{0}.UserLightValue value) thr=
ows javax.ejb.CreateException {
Post by Perez Pola, Jorge
The template entity-cmp-20.vm is what produce the error.
My ques
Loading...