org.chorem.lima.service
Class LimaServiceFactory

java.lang.Object
  extended by org.chorem.lima.service.LimaServiceFactory

public class LimaServiceFactory
extends Object

This class is a service factory based on embedded openejb container.


Field Summary
protected static InitialContext ctx
          JNDI context used to look for EJB.
protected  HashMap<Class,Object> services
           
 
Constructor Summary
protected LimaServiceFactory()
          Init openejb jndi context.
 
Method Summary
 void destroy()
          Destroy openejb jndi context.
static LimaServiceFactory getInstance()
          Return service factory singleton instance.
<M> M
getService(Class<M> serviceMonitorableClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

services

protected HashMap<Class,Object> services

ctx

protected static InitialContext ctx
JNDI context used to look for EJB.

Constructor Detail

LimaServiceFactory

protected LimaServiceFactory()
Init openejb jndi context.

Method Detail

getInstance

public static LimaServiceFactory getInstance()
Return service factory singleton instance. Init it at first call.

Returns:
singleton instance

getService

public <M> M getService(Class<M> serviceMonitorableClass)

destroy

public void destroy()
             throws Exception
Destroy openejb jndi context. Code taken from openEJB faq : http://openejb.apache.org/faq.html

Throws:
Exception - when trying to destroy a non existent application


Copyright © 2008-2010 CodeLutin. All Rights Reserved.