AbstractServer server;
if (Stateless.class.equals(getSessionType()))
server = new StatelessManager(ejbContainer, getAnnotatedType());
else if (Stateful.class.equals(getSessionType()))
server = new StatefulManager(ejbContainer, getAnnotatedType());
else if (Singleton.class.equals(getSessionType()))
server = new SingletonManager(ejbContainer, getAnnotatedType());
else
throw new IllegalStateException(String.valueOf(getSessionType()));