[jboss-user] [JBoss Seam] - Session bean inheritance

gus888 do-not-reply at jboss.com
Tue Jul 25 15:41:41 EDT 2006


Hi All,

I want to whether it is possible to use inheritance in session beans as follows: public interface BaseInterface {
  | 	public boolean isNew();
  |    
  | 	public void destroy();
  | }
  | 
  | @Local
  | public interface ProjectEditor extends BaseInterface {
  | 	...
  | 	//other business logic
  | }
  | 
  | public class BaseBean implements BaseInterface {
  | 	
  | 	@In(create=true)
  | 	private EntityManager entityManager;
  |    
  | 	@TransactionAttribute(NOT_SUPPORTED)
  | 	public boolean isNew() {
  | 		return isNew;
  | 	}
  |     
  | 	@Destroy @Remove
  | 	public void destroy() {}
  |     
  | }
  | 
  | 
  | 
  | @Name("projectEditor")
  | @Stateful
  | public class ProjectEditorBean extends BaseBean implements ProjectEditor {
  | 	...
  | 	//other business logic
  | }
Thank you in advance for any guidance!
Gus

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

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



More information about the jboss-user mailing list