* You can use ServiceLocator to get
a db connection if you define your
conn as service via JNDI in the container:

ServiceLocator locator = ServiceLocator.getInstance();
myDBConn = locator.getDBConn(ServiceLocator.MY_DB);

* Another usage can be getting JMS connection :

queueConnection = locator.getJMSQueueConn(ServiceLocator.Q_CONN);

* i don't see added value to lookup a Business Delegate which is not an EJB

José.

-----Original Message-----
From: John Boyes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 11:40 PM
To: [EMAIL PROTECTED]
Subject: Service Locator pattern useful if not using EJBs?


I'm currently deciding on which design patterns to use for a Struts-based web 
application.

Definitely going to use a Business Delegate to ensure a proper separation of the 
business and presentation tiers.

Is it good practice to use a Service Locator to look up services for the Business 
Delegate?

I can see the benefits of using a Service Locator when using EJBS, however I'm not 
going to use EJBs. Are there any other pertinent benefits in using a Service Locator, 
or is it an unneccessary extra level of complexity in a non-EJB implementation?

Any replies much appreciated,

John


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



**** DISCLAIMER ****

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to