Discussion:
[Middlegen-user] Data object / Value object generation
Bill Pfeiffer
2003-03-02 02:04:51 UTC
Permalink
Is the value object generation stuff in the latest version of Middlegen? I'm using the data object generation but middlegen only exposes it through the local interface for some reason and I would like to have it exposed for both local and remote interfaces.

BTW, is there a specific reason why the Data object is only exposed via the local interface. I manually edited the middlegen generated file and set the @ejb.interface-method view-type tag for the getData to "both" and it generated and compiled fine.

Any help here would be appreciated.

Thanks,

Bill Pfeiffer
Aslak Hellesøy
2003-03-02 21:38:55 UTC
Permalink
Value objects are not yet supported: http://tinyurl.com/6qa1

CMR doesn't work with remote interfaces, so supporting value objects through
both remote/local interfaces is a bit tricky. I never got around to make
Middlegen generate "remotable" classes in a way that doesn't stink. If you
have a patch, feel free to share it with us.

Please send mail as plain text (not HTML), so we can inline the answers.

Aslak.

-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net]On Behalf Of Bill
Pfeiffer
Sent: 2. mars 2003 05:02
To: middlegen-user
Subject: [Middlegen-user] Data object / Value object generation


Is the value object generation stuff in the latest version of Middlegen?
I'm using the data object generation but middlegen only exposes it through
the local interface for some reason and I would like to have it exposed for
both local and remote interfaces.

BTW, is there a specific reason why the Data object is only exposed via the
local interface. I manually edited the middlegen generated file and set the
@ejb.interface-method view-type tag for the getData to "both" and it
generated and compiled fine.

Any help here would be appreciated.

Thanks,

Bill Pfeiffer
Jens Fischer
2003-03-02 22:12:15 UTC
Permalink
Hello Bill,
Post by Bill Pfeiffer
Is the value object generation stuff in the latest version of Middlegen? I'm using the data object generation but middlegen only exposes it through the local interface for some reason and I would
like to have it exposed for both local and remote interfaces.
I don't know if this will help you, but if you want Middlegen to
create the @ejb.value-object xdoclet tags for you, you can create a
custom entity-cmp-20.vm velocity template file based on the
distributed file, where you put these lines just below the
#if( ${plugin.dataobject} )
...
...
#end
lines:

-------------- snip --------------
#if( ${plugin.dataobject} )
* @ejb.value-object
* name="${table.beanName}"
* extends="com.your.AbstractValueObject"
* match="*"
* instantiation="eager"
*
#end
-------------- snap --------------

Now rerun Middlegen on your database to get the new code.
When xdoclet is run over the Middlegen code you just need to
specify <valueobject/> within your <ejbdoclet> ant task and you'll end
up with what you might want.
Post by Bill Pfeiffer
Thanks,
Bill Pfeiffer
Jens

Loading...