I recommend java.lang.reflect.Proxy for serialization support, if you will
use bcel on server you will need to use it on client too ( to "transport"
class code), it will be problems with security too. You can see cglib for
examples, it generates a lot of stuff at runtime, but java reflection must
be better for this use case.


> I'd rather not use the Proxy support, as it would end
> up dragging all sorts of additional classes down to my
> client.  I want to just send a pure data transfer
> object that has the same interface as the full
> business object.
>
> Any ideas/sample code on how I could do this with
> BCEL?
>
> Thanks, Gary
>
> --- Juozas Baliuka <[EMAIL PROTECTED]> wrote:
> > Hi,
> > You can use java.lang.reflect.Proxy (since jdk 1.3)
> > to implement this.
> > There are a few open source frameworks for this use
> > case too.
> >  XORM, Voruta uses dynamic code generation for data
> > access and it must be
> > possible to find more frameworks on SF.
> > ----- Original Message -----
> > From: "Gary" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, July 28, 2003 10:49 PM
> > Subject: Dynamic Creation of Value Object
> >
> >
> > > Let's say I have the following:
> > >
> > > interface IOrder - an order interface
> > >   - getOrderID()
> > >   - setOrderID(String orderID)
> > >
> > > interface IBusinessObject - a business object plus
> > > persistence interface
> > >   - insert()
> > >   - update()
> > >   - delete()
> > >
> > > class OrderBO implements IOrder, IBusinessObject
> > >
> > > What I would like to do is avoid having to code up
> > a
> > > new class for OrderVO (order value object) that
> > > implements just IOrder, providing just getters and
> > > setters (no persistence).
> > >
> > > Does someone have code that I could use to do this
> > in
> > > BCEL?  Basically, create a class that implements
> > > IOrder and populate it with the data from a
> > > fully-formed OrderBO?
> > >
> > > Thanks, Gary
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > > http://sitebuilder.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to