[jboss-dev-forums] [Design of EJB 3.0] - Re: Component Proposal - Configurable Service Locator

jc7442 do-not-reply at jboss.com
Fri Jan 5 10:20:27 EST 2007


Sorry if it is not the right place for my comments.

My client application uses Spring framework as ServiceLocator. Injection is done using spring configuration files instead of annotations. 

>From my point of view one of the most important features of the ServiceLocator is to make client application source code independant of the technology used. With my "Spring" solution, client only see interfaces for the service. It does not have to know if the service is an EJB3, RMI, ... It is quite important for me in order to be able to reuse existing services (some of them are distibuted with RMI, others as EJB3 services and some of them with a custom distribution based on Corba).

Another requirements for a ServiceLocator is to be able to add at runtime some interceptors. For example, during the debug, I change the interceptor to provides some specific features such as chech that remote service are not invoked in Swing EventispatcherThread, measure time required to perform  a service, ... With Spring I have been able to do that (for stateless services only) using a MBean that force Spring framework to reload XML service description file.

JNDI parameters are in XMLs, they can be changed easily. 
Moving services from one EAR to another does not have impact on client source code but only on XMLs. 

Injection is performed on method not on field. 

>From your point of view is what I am doing wrong or is it just another way to do the same things ?



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

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



More information about the jboss-dev-forums mailing list