From: "John Menke" <[EMAIL PROTECTED]>
> I would like to make some additions to the turbine/jboss howto and would
> like the lists opinions on my proposed additions.
> 
> I am using session beans to encapsulate the logic of selects, inserts,
> updates and deletes.  One session bean is defined for each table (similar to
> a peer).  This session bean will return the Vectors and Hashmaps(single row
> queries) when it's (select, insert, update, delete) methods are called.  I
> have used Velocity Actions with this system in a way similar to the peers
> example in the TDK, and I instantiate the session bean and call the
> appropriate session bean method (insert, delete...)  from within the methods
> in the Action class.  I populate the Velocity context with the data that is
> returned and process the data with Velocity Templates.
> 
> This system is basically the same as the example in the TDK that uses peers,
> except I substitute the session bean for the peers class.
> 
> My question is:  Would this method of using Turbine with JBoss be acceptable
> for the howto?  (IS IT ACCEPTABLE DESIGN?)
> 

While I am certainly no expert, here are a couple of thoughts:

1. On the positive side you will gain some of the nice features of EJB
- transaction support, resource pooling, transparency of location, 
security(?), etc.  But it is important to note that these things are not
entirely free as they must still be configured in the EJB container.

2. For your implementation you could use something more efficient than
Vector - refer to the recent messages on this subject.

3. I think EJBs are ideal for situations more complex than a single row from
a table.  In particular you also need to allow for people to add business 
logic to the 'database EJBs' (for lack of a better term) - I reiterate that I
am no expert, but perhaps the classes can be extended to provide for this
(a bit like the non-'Base' classes in torque).  It would be interesting to 
experiment with EJBs that encapsulate joins as well.

4. From your subject it appears that you are proposing to update the
howto only.  Would it make sense to work on a service that generates
EJBs for the equivalent of the Base torque classes?

http://sourceforge.net/projects/ejbdoclet may be helpful if you haven't 
already seen it.

Cheers,

Scott


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

Reply via email to