Wednesday, January 18, 2012

Weblogic configurations: weblogic-ejb-jar.xml

//weblogic-ejb-jar.xml codes
URL can be referred: http://docs.oracle.com/cd/E11035_01/wls100/ejb/DDreference-ejb-jar.html
==============================================================================
//weblogic-ejb-jar.xml file structure and Elements (Complete coding is given below after following structure:
The top level elements in the WebLogic Server weblogic-ejb-jar.xml are as follows (Explanation of useful 
elements are given at the end):
-----------------------------------
    description
    weblogic-enterprise-bean
        ejb-name
        entity-descriptor | stateless-session-descriptor | stateful-session-descriptor | message-destination-descriptor
        transaction-descriptor
        enable-call-by-reference
        network-access-point
        clients-on-same-server
        run-as-principal-name
        create-as-principal-name
        remove-as-principal-name
        passivate-as-principal-name
        jndi-name
        local-jndi-name
        dispatch-policy
        remote-client-timeout
    security-role-assignment
    run-as-role-assignment
    security-permission
    transaction-isolation
    idempotent-methods
    retry-methods-on-rollback
    enable-bean-class-redeploy
    disable-warning
    work-manager
    weblogic-ejb-jar
-----------------------------------
 
//weblogic-ejb-jar.xml Elements
The following list contains the elements in weblogic-ejb-jar.xml
-----------------------------------
    allow-concurrent-calls
    allow-remove-during-transaction
    cache-between-transactions
    cache-type
    client-authentication
    client-cert-authentication
    clients-on-same-server
    concurrency-strategy
    confidentiality
    connection-factory-jndi-name
    create-as-principal-name
    delay-updates-until-end-of-tx
    description
    destination-jndi-name
    disable-warning
    dispatch-policy
    ejb-local-reference-description
    ejb-name
    ejb-reference-description
    ejb-ref-name
    enable-bean-class-redeploy
    enable-call-by-reference
    enable-dynamic-queries
    entity-always-uses-transaction
    entity-cache
    entity-cache-name
    entity-cache-ref
    entity-clustering
    entity-descriptor
    estimated-bean-size
    externally-defined
    finders-load-bean
    global-role
    home-call-router-class-name
    home-is-clusterable
    home-load-algorithm
    idempotent-methods
    identity-assertion
    idle-timeout-seconds
    iiop-security-descriptor
    initial-beans-in-free-pool
    initial-context-factory
    integrity
    invalidation-target
    is-modified-method-name
    isolation-level
    jms-client-id
    jms-polling-interval-seconds
    jndi-name
    local-jndi-name
    max-beans-in-cache
    max-beans-in-free-pool
    message-destination-descriptor
    message-destination-name
    message-driven-descriptor
    method
    method-intf
    method-name
    method-param
    method-params
    passivate-as-principal-name
    persistence
    persistence-use
    persistent-store-dir
    pool
    principal-name
    provider-url
    read-timeout-seconds
    remote-client-timeout
    remove-as-principal-name
    replication-type
    res-env-ref-name
    res-ref-name
    resource-description
    resource-adapter-jndi-name
    resource-env-description
    resource-link
    retry-methods-on-rollback
    role-name
    run-as-identity-principal
    run-as-principal-name
    run-as-role-assignment
    security-permission
    security-permission-spec
    security-role-assignment
    service-reference-description
    stateful-session-cache
    stateful-session-clustering
    stateful-session-descriptor
    stateless-bean-call-router-class-name
    stateless-bean-is-clusterable
    stateless-bean-load-algorithm
    stateless-bean-methods-are-idempotent
    stateless-clustering
    stateless-session-descriptor
    transaction-descriptor
    transaction-isolation
    transport-requirements
    trans-timeout-seconds
    type-identifier
    type-storage
    type-version
    weblogic-ejb-jar
    weblogic-enterprise-bean
    weblogic-compatibility
    work-manager
-----------------------------------
==============================================================================
//For Session beans (Stateless)
==============================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd" >

<weblogic-ejb-jar>
  <weblogic-enterprise-bean>
    <ejb-name>GatewayBMT</ejb-name>
    <stateless-session-descriptor>
      <pool>
        <max-beans-in-free-pool>200</max-beans-in-free-pool>
        <initial-beans-in-free-pool>200</initial-beans-in-free-pool>
      </pool>

      <stateless-clustering>
        <home-load-algorithm>RoundRobin</home-load-algorithm>
        <stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
      </stateless-clustering>

    </stateless-session-descriptor>

    <transaction-descriptor>
      <trans-timeout-seconds>120</trans-timeout-seconds>
    </transaction-descriptor>
  
    <enable-call-by-reference>true</enable-call-by-reference>
  
    <jndi-name>com.ewp.ejb.GatewayBMTRemoteHome</jndi-name>
  </weblogic-enterprise-bean>
  
  <transaction-isolation>
    <isolation-level>TransactionReadCommitted</isolation-level>
    <method>
      <ejb-name>GatewayBMT</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>process</method-name>
      <method-params>
        <method-param>com.ewp.core.dataobjects.EWPMessage</method-param>
      </method-params>
    </method>
  </transaction-isolation>
</weblogic-ejb-jar>
==============================================================================

//For Entity Beans

<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC 
          "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
          "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">

<weblogic-ejb-jar>
    <weblogic-enterprise-bean>
        <ejb-name>demo.Story</ejb-name>

        <entity-descriptor>
            <entity-cache>
                <max-beans-in-cache>100</max-beans-in-cache>
                <idle-timeout-seconds>600</idle-timeout-seconds>
                <read-timeout-seconds>0</read-timeout-seconds>
                <concurrency-strategy>Database</concurrency-strategy>
            </entity-cache>

            <lifecycle>
                <passivation-strategy>default</passivation-strategy>
            </lifecycle>
           
              <persistence>
                <delay-updates-until-end-of-tx>true</delay-updates-until-end-of-tx>
                <finders-load-bean>true</finders-load-bean>
                <persistence-type>
                    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
                    <type-version>5.1.0</type-version>
                    <type-storage>META-INF/weblogic-rdbms11-persistence-600.xml</type-storage>
                </persistence-type>
            
                  <db-is-shared>true</db-is-shared>
                <persistence-use>
                    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
                    <type-version>5.1.0</type-version>
                </persistence-use>
            </persistence>
            
            <entity-clustering>
                <home-is-clusterable>true</home-is-clusterable>
            </entity-clustering>
        </entity-descriptor>
        
        <transaction-descriptor>
            <trans-timeout-seconds>30</trans-timeout-seconds>
        </transaction-descriptor>
        
        <enable-call-by-reference>true</enable-call-by-reference>
        <jndi-name>demo.StoryHome</jndi-name>
    </weblogic-enterprise-bean>
    
</weblogic-ejb-jar>
==============================================================================

Element Descriptions: Please check this URL: http://docs.oracle.com/cd/E11035_01/wls100/ejb/DDreference-ejb-jar.html

1 comment:

  1. This site was... how do you say it? Relevant!!

    Finally I have found something that helped me. Appreciate it!
    Check out my website ; Fresh Coffee Beans

    ReplyDelete