"maruthi_cse" wrote : Hi svandenbussche,
  | Thank u for ur reply.So u mean to say that we must use value objects in 
between struts form and session facade?. Is there exist an example for using 
this along with struts and session facade?
  | 
  | Thanks
  | maruthi
  | 

Using Struts formbeans within Ejbs means you'll have to deploy the Struts jar, 
as well as your formbeans, in your ejb module thus in the Ejb container. The 
exception you have is probably because you deployed your formbeans in your .war 
module but not in your ejb module.

However doing so is not a good idea: what if the project changes and you guys 
want to use JSF or Spring MVC instead of Struts? You have tied your ejbs to 
Struts and you then have to modify both your JSPs _and_ your ejbs. Don't do 
that unless you expect your project to be thrown away within 6 months.

That's why a "best practice" suggests using Value Objects (which is just a 
simple POJO) in between to have both sides properly decoupled.

To do so you can either replace your formbean's member variables by one Value 
Object (VO) that has the same properties and have its get/set methods use the 
VO's properties; or you can use org.apache.commons.beanutils.BeanUtils to copy 
properties back and forth between your formbean and your VO.

Cheers,
Stephane


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880898#3880898

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880898


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to