[jboss-dev-forums] [Design of EJB 3.0] - Re: webservices ejb3 api usage

heiko.braun@jboss.com do-not-reply at jboss.com
Tue Mar 11 12:50:33 EDT 2008


Here's my 2 cents on invocation handling:

Currently we use 


  | SessionContainer.localInvoke(method, args, null, callback)
  | 

and the callback impl. supplies the WebServiceContext to the BeanContext.
However the biggest problem with this approach is that the bean context doesn't have a generic way of supplying context properties. This currently forces us to cast to a particular beancontext (StatelessBeanContext).

I think if we want to stick with that approach, we need to solve to problems: 

1) How to get to a container in the first place?
2) How to inject a webservice context in a generic way?

The first point currently relies in the ObjectName for that container and uses an aop Dispatcher to to get to the container. IMO both is crap and should be replaced by proper abstractions.

The second point can be solved two ways: Either the WS callback does the injection on it's own using reflection (2.1) or the BeanContext offers a more generic way to supply injectable properties (2.2), so that we are not forced to cast to particular container implementations. 

I would favor 2.2, since dependency injection is already part of the EJB3 domain.





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

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



More information about the jboss-dev-forums mailing list