JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Application Deployment Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of Oracle GlassFish Server 3.1 Application Deployment

2.  Deploying Applications

A.  The asadmin Deployment Subcommands

B.  GlassFish Server Deployment Descriptor Files

About the GlassFish Server Deployment Descriptors

The glassfish-application.xml File

The glassfish-web.xml File

The glassfish-ejb-jar.xml File

The sun-cmp-mappings.xml File

The glassfish-application-client.xml file

The sun-acc.xml File

The glassfish-resources.xml File

WebLogic Server Deployment Descriptor Support in GlassFish Server

C.  Elements of the GlassFish Server Deployment Descriptors

Index

The glassfish-ejb-jar.xml File

The glassfish-ejb-jar.xml file configures an enterprise bean (EJB JAR file). The element hierarchy is as follows:

glassfish-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
.  .  .  message-destination-ref
.  .  .  .  message-destination-ref-name
.  .  .  .  jndi-name
.  .  .  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
.  .  .  .  .  realm
.  .  .  .  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
.  .  .  .  debugging-enabled
.  .  .  .  property (with subelements)
.  .  .  .  .  name
.  .  .  .  .  value
.  .  .  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
.  .  .  per-request-load-balancing
.  .  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
.  .  property (with subelements)
.  .  .  name
.  .  .  value
.  compatibility
.  disable-nonportable-jndi-names
.  keep-state
.  version-identifier

Note - If any configuration information for an enterprise bean is not specified in the glassfish-ejb-jar.xml file, it defaults to a corresponding setting in the EJB container if an equivalency exists.


Here is a sample glassfish-ejb-jar.xml file:

<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//
DTD GlassFish Application Server 3.1 EJB 3.1//EN" 
"http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-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/__default</jndi-name>
        <create-tables-at-deploy>true</create-tables-at-deploy>
        <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
    </cmp-resource>
</enterprise-beans>
<keep-state>true</keep-state>
</glassfish-ejb-jar>