|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.ejb.EJBUtils
public class EJBUtils
A handy class with static utility methods. Note that much of this code has to execute in the client so it needs to be careful about which server-only resources it uses and in which code paths.
| Constructor Summary | |
|---|---|
EJBUtils()
|
|
| Method Summary | |
|---|---|
static RemoteBusinessWrapperBase |
createRemoteBusinessObject(ClassLoader loader,
String businessInterface,
Remote delegate)
|
static RemoteBusinessWrapperBase |
createRemoteBusinessObject(String businessInterface,
Remote delegate)
|
static Object |
deserializeObject(byte[] data,
ClassLoader loader)
|
static Object |
deserializeObject(byte[] data,
ClassLoader loader,
boolean resolveObject)
Utility method for deserializing EJBs, primary keys and container-managed fields, all of which may include Remote EJB references, Local refs, JNDI Contexts etc which are not Serializable. |
static void |
deserializeObjectFields(Object instance,
ObjectInputStream ois)
|
static Class |
generateSEI(ClassGeneratorFactory cgf,
String seiClassName,
ClassLoader loader,
Class beanClass)
|
static String |
getGeneratedOptionalInterfaceName(String ejbClassName)
|
static String |
getGeneratedRemoteIntfName(String businessIntf)
|
static String |
getGeneratedRemoteWrapperName(String businessIntf)
|
static String |
getGeneratedSerializableClassName(String beanClass)
|
static String |
getGenericEJBHomeClassName()
|
static String |
getRemote30HomeJndiName(String jndiName)
|
static String |
getRemoteEjbJndiName(boolean businessView,
String interfaceName,
String jndiName)
|
static String |
getRemoteEjbJndiName(EjbReferenceDescriptor refDesc)
Actual jndi-name under which Remote ejb factory lives depends on whether it's a Remote Home view or Remote Business view. |
static Class |
loadGeneratedGenericEJBHomeClass(ClassLoader appClassLoader)
|
static void |
loadGeneratedRemoteBusinessClasses(ClassLoader appClassLoader,
String businessInterfaceName)
|
static void |
loadGeneratedRemoteBusinessClasses(String businessInterfaceName)
|
static Class |
loadGeneratedSerializableClass(ClassLoader loader,
String className)
|
static Object |
lookupRemote30BusinessObject(Object jndiObj,
String businessInterface)
|
static Object |
resolveEjbRefObject(EjbReferenceDescriptor refDesc,
Object jndiObj)
|
static byte[] |
serializeObject(Object obj)
|
static byte[] |
serializeObject(Object obj,
boolean replaceObject)
Utility methods for serializing EJBs, primary keys and container-managed fields, all of which may include Remote EJB references, Local refs, JNDI Contexts etc which are not Serializable. |
static void |
serializeObjectFields(Object instance,
ObjectOutputStream oos)
|
static boolean |
useStaticCodegen()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EJBUtils()
| Method Detail |
|---|
public static final byte[] serializeObject(Object obj,
boolean replaceObject)
throws IOException
IOException
public static final byte[] serializeObject(Object obj)
throws IOException
IOException
public static final Object deserializeObject(byte[] data,
ClassLoader loader,
boolean resolveObject)
throws Exception
Exception
public static final Object deserializeObject(byte[] data,
ClassLoader loader)
throws Exception
Exceptionpublic static boolean useStaticCodegen()
public static String getGeneratedOptionalInterfaceName(String ejbClassName)
public static String getGeneratedSerializableClassName(String beanClass)
public static String getGeneratedRemoteIntfName(String businessIntf)
public static String getGeneratedRemoteWrapperName(String businessIntf)
public static String getGenericEJBHomeClassName()
public static String getRemoteEjbJndiName(EjbReferenceDescriptor refDesc)
public static String getRemote30HomeJndiName(String jndiName)
public static String getRemoteEjbJndiName(boolean businessView,
String interfaceName,
String jndiName)
public static Object resolveEjbRefObject(EjbReferenceDescriptor refDesc,
Object jndiObj)
throws NamingException
NamingException
public static Object lookupRemote30BusinessObject(Object jndiObj,
String businessInterface)
throws NamingException
NamingException
public static Class loadGeneratedSerializableClass(ClassLoader loader,
String className)
throws Exception
Exception
public static void loadGeneratedRemoteBusinessClasses(String businessInterfaceName)
throws Exception
Exception
public static void loadGeneratedRemoteBusinessClasses(ClassLoader appClassLoader,
String businessInterfaceName)
throws Exception
Exception
public static Class loadGeneratedGenericEJBHomeClass(ClassLoader appClassLoader)
throws Exception
Exception
public static Class generateSEI(ClassGeneratorFactory cgf,
String seiClassName,
ClassLoader loader,
Class beanClass)
public static RemoteBusinessWrapperBase createRemoteBusinessObject(String businessInterface,
Remote delegate)
throws Exception
Exception
public static RemoteBusinessWrapperBase createRemoteBusinessObject(ClassLoader loader,
String businessInterface,
Remote delegate)
throws Exception
Exception
public static void serializeObjectFields(Object instance,
ObjectOutputStream oos)
throws IOException
IOException
public static void deserializeObjectFields(Object instance,
ObjectInputStream ois)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||