Hello, John.
If I was to use the automatically generated EJBs, I would expect only
one EJB (entity) associated to the table. Otherwise, the model becomes
unnecesarily confusing IMHO. What should be provided, along with the
EJB, is a sample skeleton of code showing how to contact the EJB server,
how to instantiate the EJB and (probably) how to use its accesor
methods.
I think the idea is a good one, as long as it does not intend to replace
the current (fast and easy) Peers mechanism.
On 19 Jun 2001 13:15:48 -0400, John Menke wrote:
> Thanks to a suggestion from Scott Eade (thanks Scott :)) I'm looking into a
> product called EJBDoclet. It's based on Ant and will auto generate EJB's
> based on a combination of XML of java source code that is commented
> correctly. With a few tweaks, it may be possible to integrate this system
> in with the existing TDK build files so that it reads the schema.xml like
> the Torque does and generate the beans automagically.
>
> I have a few questions based on this:
>
> 1. I am proposing that the auto generation process produce 2 beans for each
> table. One entity bean that maps to the table and One Session bean that
> wraps the entity bean. The session bean could be used similar to the way the
> Peer classes are used currently.
>
> -- the problem with this is that beans might be too simple and not do
> exactly what the user wants. I think that some customization will have to
> able to made if the user selects to do so. (EJBDoclet should be able to
> handle this be letting the user specify a base class for the Entity Bean and
> base class for the Session bean)
>
> Question is: Does this represent a valid architecture? (One session bean
> per entity bean?) Or should we try to develop some sort of abstraction where
> one session bean controls many entity beans? Personally, I think that with
> the auto generation the 1/1 mapping of session beans to entity beans will be
> OK.
>
> 2. I am just learning Ant, so it would be helpful if somebody pointed to the
> scripts that read the schema file and generate the SQL. (I will probably be
> able to find them, but at the moment I'm still looking).
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
"Create like a god, Bruno Unna <[EMAIL PROTECTED]>
command like a king, Internet de Alta Calidad
and work like a slave." Red Hat Certified Engineer
Kawasaki PGP public key available
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]