[jboss-dev-forums] [Design of JBoss/Tomcat Integration] - Re: JBAS-5673 - Metadata processing

emuckenhuber do-not-reply at jboss.com
Wed Aug 6 08:41:38 EDT 2008


"scott.stark at jboss.org" wrote : 
  | 
  |   | public class FooServlet
  |   | {
  |   |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulIF.class)
  |   |     private StatefulIF statefulTestBean;
  |   | }
  |   | public class Foo2Servlet
  |   | {
  |   |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulIF2.class)
  |   |     private StatefulIF2 statefulTestBean;
  |   | }
  |   | 
  |   | @Session
  |   | public class SomeEJb
  |   | {
  |   |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulIF.class)
  |   |     private StatefulIF statefulTestBean;
  |   |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulIF2.class)
  |   |     private StatefulIF2 statefulTestBean2;
  |   | }
  |   | 
  | 

Hmm i'm not sure if i understood that correctly.

But this use case would not happen by design, as the Web25Creator does not care about @Stateful, @Stateless annotations. So SomeEjb would be treated as any other object (Servlet, Listener, ...)

Most probably we should add something to check for @Stateful, @Stateless, ... and:
1) just ignore the whole class (+ logging)
2) throw an exception
3) treat it as it's now (+ logging)

I guess nr. 1) would make most sense !?

Still having smth like:

  | public class Servlet
  | {
  |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulIF.class)
  |     private StatefulIF statefulTestBean;
  | 
  |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulLocalIF.class)
  |     private StatefulLocalIF statefulTestLocalBean;
  | }
  | 
  | public class Filter
  | {
  |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulIF.class)
  |     private StatefulIF statefulTestBean;
  | 
  |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulLocalIF.class)
  |     private StatefulLocalIF statefulTestLocalBean;
  | }
  | 
  | public class RequestListener
  | {
  |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulIF.class)
  |     private StatefulIF statefulTestBean;
  | 
  |     @EJB(beanName="StatefulTestBean", beanInterface=StatefulLocalIF.class)
  |     private StatefulLocalIF statefulTestLocalBean;
  | }
  | 
should be valid.

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

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



More information about the jboss-dev-forums mailing list