Andrus Adamchik wrote:
>>We are deploying the application in a stateful-session bean
>>(for mainly management reasons...)
>
>
> BTW, does it work OK with Cayenne? Any special handling of transactional
> behavior? Do you have any applications where DataObjects cross the wire
> from the bean to the client?
>
> I am asking, since I am constantly receiving requests about integrating
> with Cayenne from people who use (or want to use) EJB for the same reasons
> ;), and currently I have no opportunity to do an in depth investigation.
No particular problems with cayenne/EJB so far.
One issue is that you have to put all of cayenne
(that means cayenne-nodeps.jar) into the bean,
not into the system-classpath, because the
Class.forName() back to the DataObjects only
works if this is the same classloader.
(but that should be the same for a servlet?)
I'm not yet really using the Containers datasource,
but the problem I'm having is access control
to the JDBC-pool and not related to cayenne.
Cayenne's own datasource works o.k. within the bean
(but not yet caching the preapared statements...)
For the question of wiring entities to the (Swing-) Client:
I would be really happy if you could tell my
colleagues that this is a stupid idea :-)
(Some people just want to keep living in their
2-tier world, and the right answer for these
people is that they should save the money
and the trouble for the application server,
put cayenne into the client and let it talk to
the database.)
What I did is to extend code-generation
to also generate scalar data objects that
only know the attributes, but not the relations.
These scalar data-objects have overloaded
serialization for efficient wiring and
are used in client-server communication.
The interface between the scaler data objects
and the entities are methods setData()/getData()
at the base class of the entities.
best regards,
Arndt
PS: ever tried to wire an EJB entity bean ? :-)
This archive was generated by hypermail 2.0.0 : Sat Mar 29 2003 - 01:29:17 EST