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

ALRubinger do-not-reply at jboss.com
Mon Mar 12 01:13:14 EDT 2007


This weekend I've finally been able to dedicate some time to addressing the issues I'd outlined above.  The result is a project including a:

* Public Service Locator
* SLSB and SFSB Test EJBs
* Test Client invoking EJBs using Service Locator

The ServiceLocator is currently configured using a file "META-INF/service-locator.xml", which is responsible for declaring 1 or more JNP Hosts, and then mapping a series of Services (JNDI Addresses) to them.

Once packaged, the Client easily calls invocations:

ServiceLocator.getInstance().getService(TestSfsbRemote.class).test();

...illustrated above as a lookup by interface.

All non-SFSB Services are cached internally by the ServiceLocator such that subsequent requests will not require a trip to JNDI for the stub.

My next steps:

* Integrating with JBoss if approved by EJB3 Spec Leads (Bill, Carlo)?
* Tying into Carlo's Injection Framework to allow field-level injection in addition to static ServiceLocator lookup calls
* Creating a Deployer (or enhancing a current one, EjbDeployer?) to scan for an annotation demarcating which classes contain potential ServiceLocator injections

Should I be placing this project in an SVN Repository I create?  As a new project (maybe in JBoss Labs)?  I do have committer access but would like someone more familiar with proper policies to let me know where the code would be most welcome. 

Some direction, especially from Carlo in regards to getting Injection integrated, would be most appreciated.

I believe this work will greatly simplify the task of creating Distributed Applications in EJB3.

S,
ALR


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

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



More information about the jboss-dev-forums mailing list