When implementing an Enterprise Bean class, home interface, component interface, business interface, interceptor class, and the related classes, follow the naming rules described here:
- Do not place an Enterprise Bean and the related classes in a package beginning with the same name as the class name of these classes.
For example, you cannot assign a class having the same name as the package name, such as "Example.Example".
- You cannot use a package name beginning with Wrappers.
- Use alphanumeric characters and symbols in the name of an Enterprise Bean class, home interface, component interface, and business interface. You cannot use a method name and member variable name beginning with an underscore (_).
- Do not use the following methods as business methods. If you use the following methods as business methods, a compile error might occur when the application starts, and EJB might not execute correctly:
- The following methods that are defined with java.lang.Object:
equals(Object), hashCode(), toString(), clone(), finalize()
- The following methods that are defined with javax.ejb.EJBObject and javax.ejb.EJBLocalObject:
getEJBHome(), getEJBLocalHome(), getHandle(), getPrimaryKey(), isIdentical(EJBLocalObject), isIdentical(EJBObject), remove()
- In a CMP Entity Bean, you cannot specify a CMP field name and CMR field name beginning with an underscore (_).
- You cannot use a package name and class name in which the only difference is that of upper case and lower case characters. The upper case and lower case characters are not differentiated in RMI-IIOP, and therefore, the Enterprise Bean might not be accessed properly.
- In the case of existence of a class that implements java.rmi.Remote, such as the home interface of a JAR file, the stubs will be generated in the work directory. Specify the package name and class name for the class that implements java.rmi.Remote in such a way so that the path length of the work directory does not reach the upper limit of the platform. For details on estimating the length of the work directory path, see the following manuals:
- For J2EE servers
Appendix C.1 Work directory of J2EE servers in the uCosminexus Application Server System Setup and Operation Guide
- Work directory for batch servers
Appendix C.2 Work directory of batch servers in the uCosminexus Application Server System Setup and Operation Guide
- Even for a separate EJB-JAR file, make sure that the classes are not duplicated in the same application.
- Do not use the reserved names of VisiBroker for the class name of the remote interface and remote component interface of an Enterprise Bean. The reserved names of VisiBroker include Helper, Holder, Package, Operations, POA, and POATie. For details on the reserved names in VisiBroker, see the manual Borland(R) Enterprise Server VisiBroker(R) Programmer's Reference.
- When creating an Enterprise Bean class in the default package, do not create a class ending with the following strings:
- _LocalHomeImpl
- _LocalComponentImpl
- _RemoteHomeImpl
- _RemoteComponentImpl
- _LocalBIProxyImpl
- _LocalBIClientSideProxyImpl
- _RemoteBIProxyInterface
- _RemoteBIProxyImpl
- _RemoteBIClientSideProxyImpl
- _CallbackWrapperImpl
- _InvocationContextImpl
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.