The element hierarchy in the sun-ejb-jar.xml file is as follows:
sun-ejb-jar . security-role-mapping . . role-name . . principal-name . . group-name . enterprise-beans . . name . . unique-id . . ejb . . . ejb-name . . . jndi-name . . . ejb-ref . . . . ejb-ref-name . . . . jndi-name . . . resource-ref . . . . res-ref-name . . . . jndi-name . . . . default-resource-principal . . . . . name . . . . . password . . . resource-env-ref . . . . resource-env-ref-name . . . . jndi-name . . . service-ref . . . . service-ref-name . . . . port-info . . . . . service-endpoint-interface . . . . . wsdl-port . . . . . . namespaceURI . . . . . . localpart . . . . . stub-property . . . . . . name . . . . . . value . . . . . call-property . . . . . . name . . . . . . value . . . . . message-security-binding . . . . . . message-security . . . . . . . message . . . . . . . . java-method . . . . . . . . . method-name . . . . . . . . . method-params . . . . . . . . . . method-param . . . . . . . . operation-name . . . . . . . request-protection . . . . . . . response-protection . . . . call-property . . . . . name . . . . . value . . . . wsdl-override . . . . service-impl-class . . . . service-qname . . . . . namespaceURI . . . . . localpart . . . pass-by-reference . . . cmp . . . . mapping-properties . . . . is-one-one-cmp . . . . one-one-finders . . . . . finder . . . . . . method-name . . . . . . query-params . . . . . . query-filter . . . . . . query-variables . . . . . . query-ordering . . . . prefetch-disabled . . . . . query-method . . . . . . method-name . . . . . . method-params . . . . . . . method-param . . . principal . . . . name . . . mdb-connection-factory . . . . jndi-name . . . . default-resource-principal . . . . . name . . . . . password . . . jms-durable-subscription-name . . . jms-max-messages-load . . . ior-security-config . . . . transport-config . . . . . integrity . . . . . confidentiality . . . . . establish-trust-in-target . . . . . establish-trust-in-client . . . . as-context . . . . . auth-method . . . . . realm . . . . . required . . . . sas-context . . . . . caller-propagation . . . is-read-only-bean . . . refresh-period-in-seconds . . . commit-option . . . cmt-timeout-in-seconds . . . use-thread-pool-id . . . gen-classes . . . . remote-impl . . . . local-impl . . . . remote-home-impl . . . . local-home-impl . . . bean-pool . . . . steady-pool-size . . . . resize-quantity . . . . max-pool-size . . . . pool-idle-timeout-in-seconds . . . . max-wait-time-in-millis . . . bean-cache . . . . max-cache-size . . . . resize-quantity . . . . is-cache-overflow-allowed . . . . cache-idle-timeout-in-seconds . . . . removal-timeout-in-seconds . . . . victim-selection-policy . . . mdb-resource-adapter . . . . resource-adapter-mid . . . . activation-config . . . . . description . . . . . activation-config-property . . . . . . activation-config-property-name . . . . . . activation-config-property-value . . . webservice-endpoint . . . . port-component-name . . . . endpoint-address-uri . . . . login-config . . . . . auth-method . . . . message-security-binding . . . . . message-security . . . . . . message . . . . . . . java-method . . . . . . . . method-name . . . . . . . . method-params . . . . . . . . . method-param . . . . . . . operation-name . . . . . . request-protection . . . . . . response-protection . . . . transport-guarantee . . . . service-qname . . . . tie-class . . . . servlet-impl-class . . . flush-at-end-of-method . . . . method . . . . . description . . . . . ejb-name . . . . . method-name . . . . . method-intf . . . . . method-params . . . . . . method-param . . . checkpointed-methods . . . checkpoint-at-end-of-method . . . . method . . . . . description . . . . . ejb-name . . . . . method-name . . . . . method-intf . . . . . method-params . . . . . . method-param . . pm-descriptors . . cmp-resource . . . jndi-name . . . default-resource-principal . . . . name . . . . password . . . property (with subelements) . . . . name . . . . value . . . create-tables-at-deploy . . . drop-tables-at-undeploy . . . database-vendor-name . . . schema-generator-properties . . . . property (with subelements) . . . . . name . . . . . value . . message-destination . . . message-destination-name . . . jndi-name . . webservice-description . . . webservice-description-name . . . wsdl-publish-location
If any configuration information for an enterprise bean is not specified in the sun-ejb-jar.xml file, it defaults to a corresponding setting in the EJB container if an equivalency exists.
Here is a sample sun-ejb-jar.xml file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 8.1 EJB 2.1//EN' 'http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-1.dtd'> <sun-ejb-jar> <display-name>First Module</display-name> <enterprise-beans> <ejb> <ejb-name>CustomerEJB</ejb-name> <jndi-name>customer</jndi-name> <bean-pool> <steady-pool-size>10</steady-pool-size> <resize-quantity>10</resize-quantity> <max-pool-size>100</max-pool-size> <pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds> </bean-pool> <bean-cache> <max-cache-size>100</max-cache-size> <resize-quantity>10</resize-quantity> <removal-timeout-in-seconds>3600</removal-timeout-in-seconds> <victim-selection-policy>LRU</victim-selection-policy> </bean-cache> </ejb> <cmp-resource> <jndi-name>jdbc/PointBase</jndi-name> <create-tables-at-deploy>true</create-tables-at-deploy> <drop-tables-at-undeploy>true</drop-tables-at-undeploy> </cmp-resource> </enterprise-beans> </sun-ejb-jar>