Discussion:
[Middlegen-user] 'create' methods on *remote* home with *local* interface parameters
Russell Black
2002-11-13 05:28:01 UTC
Permalink
First, I want to say God Bless Middlegen!, and kudos to Aslak and the other developers. This will be an enormous time saver if I can get it to do what I need.

When I configure middlegen to generate remote interfaces (viewtype="remote" in the cmp20 subtask), it generates create methods which take local interfaces as parameters.

For example: a Choice belongs to a Scale, and the middlegen-erated create method in ChoiceBean looks like this:

public foo.interfaces.ChoicePK ejbCreate( int number, java.lang.String text, boolean na, icoachplus.interfaces.ScaleLocal scale )

Resulting in an xdoclet-generated *remote* interface that looks like this:

public foo.interfaces.Choice create(int number , java.lang.String text , boolean na , icoachplus.interfaces.ScaleLocal scale)

This causes two issues. First, since it didn't generate any local interfaces, it won't compile. I can make it compile by using viewtype="both", but the real issue in my mind is: what good is a create method on a remote interface that takes local interfaces as parameters? A remote client of course does not have access to local interfaces.

I love the CMR feature introduced in EJB 2.0, so I want to use local interfaces where I can, but I'd really like to be able to create objects with the remote interfaces where running in the same JVM is not an option.
Eivind Waaler
2002-11-13 06:20:01 UTC
Permalink
Hey I looked through the Middlegen buglist and seems there are some bugs
related to this:

http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D596249&group_i=
d=3D36044&atid=3D415990
http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D615463&group_i=
d=3D36044&atid=3D415990

I see from a comment by Aslak that CMRs do not apply to remote beans at
all. So I guess the fix to this would be something like this (I might be
wrong here):

local - Create methods with CMR fields linking to other local interfaces.
remote - Create methods with just the fields (like flightId instead of
flightLocal)

Anyone has time to look into this? Involvement from more users would be
really good I think, as the developers are really busy for the
moment. Submitted patches/solutions are so much quicker to add than
sitting down and figuring things out..

=2Eeivind
First, I want to say God Bless Middlegen!, and kudos to Aslak and the oth=
er developers. This will be an enormous time saver if I can get it to do w=
hat I need.
=20
When I configure middlegen to generate remote interfaces (viewtype=3D"rem=
ote" in the cmp20 subtask), it generates create methods which take local in=
terfaces as parameters.
=20
For example: a Choice belongs to a Scale, and the middlegen-erated creat=
=20
public foo.interfaces.ChoicePK ejbCreate( int number, java.lang.String=
text, boolean na, icoachplus.interfaces.ScaleLocal scale )=20
=20
Resulting in an xdoclet-generated *remote* interface that looks like this=
: =20
=20
public foo.interfaces.Choice create(int number , java.lang.String text , =
boolean na , icoachplus.interfaces.ScaleLocal scale)
=20
This causes two issues. First, since it didn't generate any local interf=
aces, it won't compile. I can make it compile by using viewtype=3D"both", =
but the real issue in my mind is: what good is a create method on a remote=
interface that takes local interfaces as parameters? A remote client of c=
ourse does not have access to local interfaces.
=20
I love the CMR feature introduced in EJB 2.0, so I want to use local inte=
rfaces where I can, but I'd really like to be able to create objects with t=
he remote interfaces where running in the same JVM is not an option.
=20
Thanks,
=20
Russell
=20
N=18=AC=B1=F9=DE=B5=E9=9A=8AX=AC=B2=9A'=B2=8A=DEu=BC=BE=02=B7=B2=A2=EC(=
=AE=B8=9Eu=A6=E8=BA=DC=A8=BA=BC=1En=C7=AB=BD=EA=ECy=CB=AB=8A=DC=82=96'$=85=
=EA=DE~=8A=DA=15=11=04N=16=B0=B5=E0)i=C8^I"=C6=BA'^jwZ=9E=CC=1E=AF*.=AC
Zr=17=92H=BB=1Er=EA=E2=B7)=DEy=DB>=86=DBi=FB=FF=F0=C3=08(=B6=16=B0=B5=E7(=
=9B=FA=DD=E7m=E1=B6if=89=D7ez=07=A7=BA=C7=AB=99=A8=A5=8Ax%=8A=CBf=89=D7ez=
=07=A7=BA=C7=AB=96+-=B2=CA.=AD=C7=9F=A2=B8=1E=9D=EBa=B6=DAl=FB=FF=E5=8A=CBl=
=B2=8B=ABq=E7=E8=AE=07=A7z=DF=E5=8A=CBl=FEX=AC=B6)=DF=A3=F9=A2u=D9^=81=E9=
=EE=B1=EA

Loading...