EJB.17.4 ejb-client JAR FileThe EJB JAR file producer can create an ejb-client JAR file for the EJB JAR file. The ejb-client JAR file contains all the class files that a client program needs to use the client view of the enterprise beans that are contained in the EJB JAR file. The ejb-client JAR file is specified in the deployment descriptor of the EJB JAR file using the optional ejb-client-jar element. The deployer should ensure that the specified ejb-client JAR file is accessible to the client program's class-loader. If no ejb-client-jar element is specified, the deployer should make the entire EJB JAR file accessible to the client's class-loader. The EJB specification does not specify whether the EJB JAR file should include by copy or by reference the classes that are in the ejb-client JAR. If the by-copy approach is used, the producer simply includes all the class files in the ejb-client JAR file also in the EJB JAR file. If the by-reference approach is used, the EJB JAR file producer does not duplicate the content of the ejb-client JAR file in the EJB JAR file, but instead uses a Manifest Class-Path entry in the EJB JAR file to specify that the EJB JAR file depends on the ejb-client JAR at runtime. The use of the Class-Path entries in the JAR files is explained in the Java 2 Platform, Enterprise Edition Specification. |