struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assenza, Chris" <>
Subject Communicating with EJB's from Action
Date Thu, 29 Mar 2001 21:58:40 GMT
Hello! :) 

Our dev team for a big enterprise app has been going back and forth on how
to send the data from the ActionForm to a Session bean.  We have a number of
options and I was hoping for some feedback because we've had enough talk and
its time to decide! :) (Our architecture is as of now to use only Session
Beans, but we will probably start wrapping Entity beans with Session beans

1) Send the ActionForm to the EJB from Action perform()
	Pros: Easy and less work
	Cons: Defeats the purpose of Struts in that the Business Logic is no
longer self-contained and independent of the V in MVC :). If for whatever
reason we overhaul the front end and remove Struts, we're not in the ideal
position to do so. 

2) Create a special utility class that with special methods, that when
invoked from the Action perform() method, will put the data from ActionForm
into a HashTable.  Then, we'll pass that object to the EJB and do whatever
business logic is necessary.  

3) JMS - Sort of an adaptation of the number 2 as JMS uses HashMaps and the
like but it follows a specific spec and has a lot more to it then what we'd
be doing above.  However, none of us really know much about JMS yet. :|
Obviously we can learn, but is it a recommended path to follow from your
experience? (in regards to Struts specifically as well). 

4) RMI or RMI-IIOP.  Create a remote object within the client and pass the
remote reference to the EJB.  The EJB can then use this reference to make
callbacks to the client.  Not sure about this one either, seems rather

Oh, and one other question, since DataTable (Java collection) is basically
made up of vectors, can one use the iterate tag to move through it?

Any thoughts or experiences?? :)


Chris Assenza

View raw message