Weblogic EJB Deployment Descriptor

Hi,
Can someone help me in learning how to write weblogic specific deployment descriptors for EJBs ??? Where can I find good tutorial or help. I am new to EJB.
Thank you in advance

Why not search http://bea.com and see what pops up. I searched their site for "EJB deployment descriptors" and got quite a few hits.

Similar Messages

  • EJB deployment descriptors in clustered environment

              I was wondering how EJB deployment descriptor settings work in a clustered environment. Are the deployment descriptors per WebLogic instance they are deployed in or the entire clustered environment? For example, if my descriptor for a stateless session ejb has max-beans-in-free-pool set to 5 and I deploy this stateless ejb in 4 WebLogic instances of one cluster, does this mean that there will be a max of 5 instance of this bean in the free pool for the entire cluster or will there be a max of 20 (5 per WebLogic instance and 4 WebLogic instances in the cluster) instances of this bean for the entire cluster?
              Thanks,
              Bryan
              

    Those settings are per server instance.
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Bryan Dixon" <[email protected]> wrote in message
              news:3a6b51a0$[email protected]..
              >
              > I was wondering how EJB deployment descriptor settings work in a clustered
              environment. Are the deployment descriptors per WebLogic instance they are
              deployed in or the entire clustered environment? For example, if my
              descriptor for a stateless session ejb has max-beans-in-free-pool set to 5
              and I deploy this stateless ejb in 4 WebLogic instances of one cluster, does
              this mean that there will be a max of 5 instance of this bean in the free
              pool for the entire cluster or will there be a max of 20 (5 per WebLogic
              instance and 4 WebLogic instances in the cluster) instances of this bean for
              the entire cluster?
              >
              > Thanks,
              > Bryan
              >
              

  • EJB deployment descriptor vs. annotations

    Hi,
    I need some example of EJB deployment descriptor and matching Java code with annotations for my school project. In other words I need the same information in descriptor and in annotations. If anyone would provide me with some simple sample, I would be very thankful.
    Milan

    This shows an ejb-jar.xml file. At the bottom it breaks down what each section does and what annotation it refers to, should be straight forward to create some code snippets from it...
    [http://docs.jboss.com/ejb3/app-server/reference/build/reference/en/html/partial_deployment_descriptors.html|http://docs.jboss.com/ejb3/app-server/reference/build/reference/en/html/partial_deployment_descriptors.html]
    n

  • Weblogic vendor specific EJB deployment descriptor

    Hi All,
    I have been trying to get weblogic-ejb.xml working to provide the names where I want my EJB3 beans accessable in JNDI, but this has not been working for me.
    I have been looking through the web - there are not too many mentions of the deployment descriptor. If there any tutorials or official documents from BEA on this, links would be highliy appreciated.
    I am using WL10_01 if it helps.
    Thanks,
    Kirill.

    Did you try <business-interface-jndi-name-map> tag in weblogic-ejb-jar.xml?
    With the following example setup, you should be able to look up the Session bean that implements service.JPAService interface in JNDI tree with "JPAService".
    <weblogic-enterprise-bean>
        <ejb-name>JPAServiceBean</ejb-name>
         <stateless-session-descriptor>
          <business-interface-jndi-name-map>
               <business-remote>service.JPAService</business-remote>
            <jndi-name>JPAService</jndi-name>
          </business-interface-jndi-name-map>
        </stateless-session-descriptor>     
        <enable-call-by-reference>true</enable-call-by-reference>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>

  • About EJB deployment descriptor

    Hello. I am developing EJB3 with glassfish and weblogic 10. I know I can use annotations to simplify
    deployment without using ejb-jar.xml , sun-ejb-jar.xml, weblogic-ejb-jar.xml. However, I do want to know
    how to write these files correctly because they have higher priority when used.
    Somebody may give me a template about writing these files? (ejb 3 specification, for ejb2, I can
    use xdoclet to generate them).Thanks a lot.

    Hi Martin,
    you're are right, XDoclet support for OC4J is lacking the most important stuff. In my case I needed explicit mapping of CMR-fields. Of course, manually editing orion-ejb-jar.xml either by using a text editor or JDeveloper is no option at all.
    So I've added support for explicit CMR-mapping to the OC4J XDoclet templates. It works but wasn't fun to do as Oracle's documentation of CMR-mapping is highly inconsistent (e.g. text, figures, and example code are not in sync).
    As I've done this as part of a services contract, I cannot easily publish the results. I'll ask my client and let you know.
    Anyway, orion-ejb-jar.xml will be obsolete by default in OC4J 10.x as Oracle switches to Toplink as the default persistence manager. So again, XDoclet support is needed for generating the Toplink-specific deployment descriptor.
    I'd really appreciate Oracle to provide OC4J-specific XDoclet enhancements. This would help OC4J in gaining wider acceptance.
    Stefan

  • EJB Deployment Descriptors not deploying to WLS

    Hi,
    We're using Eclipse 3.4.1 with the OEPE to target WLS 10.3 with Java 6/JEE 1.4 on a Windows XP Professional development machine.
    We have an EJB 2.1 project as part of a larger EAR. The beans (all stateless session beans) and associated interfaces and deployment descriptors within are maintained manually for internal reasons; we do not rely on EJBGen or XDoclet or anything like that to manage these. We are NOT using any annotations in these EJBs, as is the default when you create a bean. Instead we rely on weblogic-ejb-jar.xml and ejb-jar.xml.
    We're having an issue where deploying to the local Weblogic server instance fails with the following error displaying in the Eclipse console:
    <Dec 19, 2008 9:21:13 AM CST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'xxxxxxx'.>
    <Dec 19, 2008 9:21:13 AM CST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Exception preparing module: EJBModule(xxxxxxxEJB.jar)
    [EJB:011023]An error occurred while reading the deployment descriptor. The error was:
    No EJBs found in the ejb-jar file {0}. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation..
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
         Truncated. see log file for complete stacktrace
    java.io.IOException: No EJBs found in the ejb-jar file {0}. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
         at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:199)
         at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
         at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1198)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
         Truncated. see log file for complete stacktrace
    We DO have multiple beans defined, but it seems that WLS just isn't aware of them due to the lack of a deployment descriptor. It appears that Eclipse/OEPE is not copying the ejb-jar.xml and weblogic-ejb-jar.xml files to the build directory when the project is build:
    xxxxxEJB
    |-- ejbModule
    |.....|-- META-INF
    |.....|.....|-- ejb-jar.xml
    |.....|.....|-- MANIFEST.MF
    |.....|.....|-- weblogic-ejb-jar.xml
    |.....|-- com (etc., .java files)
    |-- build
    ......|-- classes
    ............|-- META-INF
    ............|......|-- MANIFEST.MF
    ............|-- com (etc, .class files)
    Other notes:
    - Cleaning the project does not help.
    - Starting a new workspace does not help.
    - It works under Eclipse 3.3.2 with the Europa version of OEPE.
    - Explicitly exporting an EJB Jar file DOES include the two deployment descriptors (just not deploying to the embedded test server we've defined in our Servers view)
    Any ideas? This seems like either a bug in the OEPE, or maybe WTP.

    Yes, I have a simple EJB2.1 project with hand-crafted EJB remote/home interfaces/classes and deployment descriptors. Also tried Clean/Rebuild and manually delete
    files under /build/classes.
    Here are my descriptors files:
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
         <display-name>TestEJB</display-name>
    <enterprise-beans>
    <session>
    <display-name>HelloSessioin</display-name>
    <ejb-name>HelloSession</ejb-name>
    <home>sessions.HelloSessionHome</home>
    <remote>sessions.HelloSession</remote>
    <ejb-class>sessions.HelloSessionBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </session>
    </enterprise-beans>
    </ejb-jar>
    weblogic-ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-ejb-jar
    xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
    <weblogic-enterprise-bean>
    <ejb-name>HelloSession</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <jndi-name>ejb.HelloSessionRemoteHome</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    Did you check if there is any error/warning in Error Log view?

  • Disappearing weblogic.xml deployment descriptor elements

    Using WebLogic 8.1 SP1
    We have an application that we deploy with a weblogic.xml file. This file has
    half-a-dozen deployment descriptor elements, and for some reason I'm unaware of,
    several of the parameters specified by these elements are set to their default
    values, and these elements don't show up in the weblogic.xml deployment decriptor
    when displayed from within the WebLogic Server console. When deploying an exploded
    EAR, I can change the value to something non-default , look at the deployment
    descriptor and the element appears; change it back and the element is gone.
    Is this expected behavior? Is there any configuration setting to display all
    the elements no matter the value?
    Thanks.

    ram ram <> wrote:
    should i used new jdk that comes with the upgrade package of 8.1.6 like
    (jdk1.4.11)
    my class path having the weblogic jar also.
    this is my class path.:
    E:\bea\weblogic81\server\lib\weblogic.jar and other my application
    jars.
    Add tools.jar from your Java installation to the classpath.
    Bart
    Schelstraete Bart
    http://www.schelstraete.org
    http://www.mqseries.be

  • Does pass-by-value in an EJB deployment descriptor work in iAS 6.0 sp4?

    I deployed an EJB into iAS 6.0 SP4 with pass-by-value session element set to true but the EJB is still passing by reference. Is this a known problem in SP4? I checked the session descriptor in kregedit for that EJB and I couldn't find any entry that relates to the pass-by-value element.
    Please help.

    Hi Yudong,
    Thanks for the info. Do you know if this is only specific to SP4? The problem seems to be present in SP3 as well.
    Thanks

  • EJB deployment descriptor

    Hi
    I have jusr started with the EJB. I am using JBoss Server.
    I have a session bean and a MessageDrivenBean in the same package. Do I mention both of them in the same ejb-jar.xml file place inside the META-INF directory as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>AccountManager6JAR</display-name>
    <enterprise-beans>
    <session>
    </session>
    <message-driven>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    I addition to the above I also have the jboss.xml file in META-INF directory as follows:
    <?xml version="1.0"?>
    <jboss>
    <enterprise-beans>
    <message-driven>
    <res-ref-name>.....</res-ref-name>
    <configuration-name>.....</configuration-name>
    <jndi-name>.....</jndi-name>
    </message-driven>
    </enterprise-beans>
    </jboss>
    do I need to add an entry of the my message driven bean in the ejb-jar.xml file or having the jboss.xml file is sufficient??
    Many thanks for the help!!

    Well, the xml file for JBoss is specific to JBoss. Therefore you should refer to JBoss documentation for that. However, what I suggest is that you make a EAR file out of your jars and then deploy it. That should solve the problem, as EAR file is a standard.
    Ironluca

  • Oracle 9i and Weblogic EJB Deployment...

    what is the differencement of depoying the CMP Bean in weblogic server and a Oracle 9i server. Please explain in details. awaiting to hear soon. thankx n advance.

    what is the differencement of depoying the CMP Bean in weblogic server and a Oracle 9i server. Please explain in details. awaiting to hear soon. thankx n advance.

  • Ejb deployment descriptor tag

    Hello,
    Is it possible to add specific attributs in addition of the existing tag for an ejb into the ejb_jar file?
    thank u
    ad

    According to the Dtd for ejb-jar.xml the session & entity bean tags
    do not have any attributes.
    thanks,
    Deepak

  • Deployment descriptor error for an EJB 3.0 entity bean module

    Hi all,
    i'm facing an error deploying an EJB 3.0 entity bean module wrapped in an enterprise application on WebLogic 10.
    The application is composed as follows:
    WASEnterprise.ear
    |-META-INF
    |-application.xml
    |-WAS.jar
    |-META-INF
    |-persistence.xml
    In other words the application server is unable to load persistence.xml deployment descriptor and,during deployment, it throws an error message like this:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\bea\user_projects\domains\base_domain\autodeploy\WASEnterprise\WAS/META-INF/persistence.xml of module WAS. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    I suppose that the persistence.xml is correct since i can deploy the application on jboss without any problem.
    The persistence.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="CNT4">
    <non-jta-data-source>cnt5ds</non-jta-data-source>
    <class>it.eni.italgas.was.db.entity.AsiDisco</class>
    <class>it.eni.italgas.was.db.entity.AsiErrori</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRouting</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRoutingId</class>
    <class>it.eni.italgas.was.db.entity.WasAsiSchemas</class>
    </persistence-unit>
    </persistence>
    and the application.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    <display-name>WASEnterprise</display-name>
    <module id="myeclipse.1188512259959">
    <ejb>WAS.jar</ejb>
    </module>
    </application>
    I don't use any other weblogic specific deployment descriptor.
    Have you ever experienced such a strange behaviour? Can you suggest something to solve the problem?
    Thanks inadvance.
    Denis Maggiorotto

    Hi all,
    i'm facing an error deploying an EJB 3.0 entity bean module wrapped in an enterprise application on WebLogic 10.
    The application is composed as follows:
    WASEnterprise.ear
    |-META-INF
    |-application.xml
    |-WAS.jar
    |-META-INF
    |-persistence.xml
    In other words the application server is unable to load persistence.xml deployment descriptor and,during deployment, it throws an error message like this:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\bea\user_projects\domains\base_domain\autodeploy\WASEnterprise\WAS/META-INF/persistence.xml of module WAS. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    I suppose that the persistence.xml is correct since i can deploy the application on jboss without any problem.
    The persistence.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="CNT4">
    <non-jta-data-source>cnt5ds</non-jta-data-source>
    <class>it.eni.italgas.was.db.entity.AsiDisco</class>
    <class>it.eni.italgas.was.db.entity.AsiErrori</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRouting</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRoutingId</class>
    <class>it.eni.italgas.was.db.entity.WasAsiSchemas</class>
    </persistence-unit>
    </persistence>
    and the application.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    <display-name>WASEnterprise</display-name>
    <module id="myeclipse.1188512259959">
    <ejb>WAS.jar</ejb>
    </module>
    </application>
    I don't use any other weblogic specific deployment descriptor.
    Have you ever experienced such a strange behaviour? Can you suggest something to solve the problem?
    Thanks inadvance.
    Denis Maggiorotto

  • Custom deployment descriptor

    Hi there
    We are in the process of deploying our standard J2EE EAR file to
    WebLogic 9.2 MP2. The EAR file does not contain weblogic custom
    deployment descriptors (e.g.: weblogic.xml) but only standard DDs (e.g.:
    web.xml)
    I have some doubts about resources mapping and I'd like to get some help
    from experienced WL users.
    Basically our EAR file is composed of an EJB module and a WEB module.
    Each module declares some references such as:
    WEB.XML snippet
    <resource-ref>
    <description>DataSource for partition 'default'</description>
    <res-ref-name>jdbc/Datasource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    Now the questions:
    1) Is there a way to map the resources during the deployment, using the
    console? This is the way followed by WebSphere and Oracle AS, for
    example. If this is not possible, should I provide a Deployment Plan for
    that EAR file? I tried to provide the xml Deployment Plan generated by
    weblogic.PlanGenerator utility together with the EAR file while
    deploying the app, but no luck. It seems the Deployment Plan should be
    provided in a jar file. Is that correct?
    2) If the previous options are not possible, how can I create the custom
    deployment descriptor? Is there an "Assembly Tool" that imports the
    standard EAR and then export the custom EAR file with the custom
    deployment descriptors correctly generated?
    Thank you a lot in advance.

    A deployment plan is external to the ear/jar file.
    It is probably easiest to deploy the application with the console, and then
    use the console to change the values you want. It will automatically
    generate a deployment plan for you.
    "Quasar" <[email protected]> wrote in message
    news:[email protected]..
    Hi there
    We are in the process of deploying our standard J2EE EAR file to
    WebLogic 9.2 MP2. The EAR file does not contain weblogic custom
    deployment descriptors (e.g.: weblogic.xml) but only standard DDs (e.g.:
    web.xml)
    I have some doubts about resources mapping and I'd like to get some help
    from experienced WL users.
    Basically our EAR file is composed of an EJB module and a WEB module.
    Each module declares some references such as:
    WEB.XML snippet
    <resource-ref>
    <description>DataSource for partition 'default'</description>
    <res-ref-name>jdbc/Datasource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    Now the questions:
    1) Is there a way to map the resources during the deployment, using the
    console? This is the way followed by WebSphere and Oracle AS, for
    example. If this is not possible, should I provide a Deployment Plan for
    that EAR file? I tried to provide the xml Deployment Plan generated by
    weblogic.PlanGenerator utility together with the EAR file while
    deploying the app, but no luck. It seems the Deployment Plan should be
    provided in a jar file. Is that correct?
    2) If the previous options are not possible, how can I create the custom
    deployment descriptor? Is there an "Assembly Tool" that imports the
    standard EAR and then export the custom EAR file with the custom
    deployment descriptors correctly generated?
    Thank you a lot in advance.

  • ExportException+StubNotFoundException in Clustered EJB Deployment

              Hi All,
              I'm a Newbie to WebLogic and would appreciate help in solving my problem.
              I am running WLS 5.1sp6 on NT4 and am trying to implement a two server cluster on one machine.
              The cluster runs fine, but as soon as I try to deploy our EJBs in the cluster level properties file I get the exceptions listed in the attached log.
              In a standalone environment the EJBs function flawlessly but not in a cluster.
              Notice that the EJB is successfully deployed to the server but the exception crops up a little further down the track.
              The only unusual thing about the environment I can think of is the WebLogic CLASSPATH is disabled.
              The EJB deployment descriptor contains:
              <clustering-descriptor>
              <home-is-clusterable>True</home-is-clusterable>
              <stateless-bean-is-clusterable>True</stateless-bean-is-clusterable>
              </clustering-descriptor>
              Any ideas?
              Thanks in advance,
              Andrew
              [weblogic.log]
              

              Hi all,
              It seems it was a classpath problem ...I put the ejb jar file in the java classpath and now it works like a charm.
              Thanks for the tip Chris!
              Andrew
              "Chris Jones" <[email protected]> wrote:
              >
              >Hi,
              >
              >Sounds like a classpath problem. The cluster is trying to instantiate the EJB but the stub is not in the weblogicclasspath. I&#8217;m not sure what you mean when you say it is disabled.
              >
              >Hope this helps,
              >
              >Chris
              >
              >"Andrew Quinan" <[email protected]> wrote:
              >>
              >>
              >>
              >>Hi All,
              >>
              >>I'm a Newbie to WebLogic and would appreciate help in solving my problem.
              >>
              >>I am running WLS 5.1sp6 on NT4 and am trying to implement a two server cluster on one machine.
              >>
              >>The cluster runs fine, but as soon as I try to deploy our EJBs in the cluster level properties file I get the exceptions listed in the attached log.
              >>
              >>In a standalone environment the EJBs function flawlessly but not in a cluster.
              >>Notice that the EJB is successfully deployed to the server but the exception crops up a little further down the track.
              >>
              >>The only unusual thing about the environment I can think of is the WebLogic CLASSPATH is disabled.
              >>
              >>The EJB deployment descriptor contains:
              >><clustering-descriptor>
              >> <home-is-clusterable>True</home-is-clusterable>
              >> <stateless-bean-is-clusterable>True</stateless-bean-is-clusterable>
              >></clustering-descriptor>
              >>
              >>Any ideas?
              >>
              >>Thanks in advance,
              >>Andrew
              >
              

  • Building weblogic ejbs with ant...

    Hi, it may be not the proper place, but I haven't found a better one...
    Here comes my question:
    I have an ant build.xml file where I have the following tasks defined:
    <property name="ejb.dtd.location" value="weblogic/ejb/deployment/xml/ejb-jar.dtd"/>
        <condition property="ejb.dtd.location" value="weblogic/ejb20/dd/xml/ejb11-jar.dtd">
          <equals arg1="${weblogic.major.version}" arg2="6"/>
        </condition>
        <property name="weblogic.ejb.dtd.location" value="weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd"/>
        <condition property="ejb.dtd.location" value="weblogic/ejb20/dd/xml/weblogic510-ejb-jar.dtd">
          <equals arg1="${weblogic.major.version}" arg2="6"/>
        </condition>
    <!-- compiles EJBs -->
      <target name="compile.ejb" depends="init">
        <javac srcdir="${srcDir.ejb}"
              destdir="${srcDir.ejb}"
                debug="${npm.debug}">
          <classpath id="ejb.cpath">
             <pathelement path="${weblogic.sp.path}"/>
             <pathelement path="${weblogic.core.path}"/>
             <pathelement location="${outDir.core}${file.separator}npm.jar"/>
             <pathelement location="${srcDir.ejb}"/>
           </classpath>
        </javac>
      </target>
      <!-- delivers EJBs -->
      <target name="make.ejb" depends="prepare, compile.ejb">
        <!-- ejbc 'n jar 'em -->
        <ejbjar srcdir="${srcDir.ejb}">
           <weblogic destdir="${outDir.ejb}"
                     compiler="${compiler.ejb}"
                     keepgeneric="false"
                     suffix=".jar"
                     args="-g -nowarn"
                     oldCMP="false">
             <classpath refid="ejb.cpath"/>
           </weblogic>
           <include name="**/*-ejb-jar.xml"/>
           <exclude name="**/*-weblogic-ejb-jar.xml"/>
           <!-- WLS v5 DTDs!!! -->
           <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
                location="${ejb.dtd.location}"/>
           <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
                location="${weblogic.ejb.dtd.location}"/>
        </ejbjar>
      </target>This should build my ejbs with either the wls61 ejbc or the wls51 one. Anyway ant seems to have problems finding the local dtds in the classpath, although this is specified in the documentation. When I set both location attributes to point to files it works perfect. The problem is that these are in weblogic.jar for the wls61 release. This has two solutions, but either are bad in my opinion:
    1. extract the needed dtds to a temp dir with a jar task and then delete em...
    2. put the proper wls.jar in the classpath so ejbc could automatically resolve the dtds
    Can anyone help or may be send his ant build file, where a <dtd> nested element is used for <ejbjar> for wls61?
    Thank you in advance
    Anton

    Anton,
    Your second solution is the correct one. If you look at dtd element description under ejbjar task in the Ant manual, you'll see that vendors jars are required in Ant's classpath in order for ejbjar task to resolve DTD dependencies, in which case you don't need to specify dtd elements. I don't particularly like it either. If you find a better way to solve this problem, let me know.
    -Dmitry

Maybe you are looking for

  • How to call a variable in another class????

    if i have two classes in a package. From one class, how do i get the value of one of the variable in the other class. For example; Class A have a variable call totalNum which have a value initialise. Class B wan to get the value variable totalNum in

  • HVR M15 deck when switched off causes 800 fire wire drive to un-mount

    Hi I know this was a previous posting but I couldn't see a solution to it and it has now been archived. When I'm using FCP or even when I'm not, when I switch off the HVR M15 deck it causes the Lacie drive connected via Firewire 800 to un-mount. If F

  • Change the boot order of an RHEL  ESXi server

    How to  programmatically change the boot order of an RHEL  ESXi server?

  • Upgrading iPhoto Library from Apple Time Capsule

    I have put my iPhoto library onto my Time Capsule, and I know I need to upgrade my library. Every time I open iPhoto, I am asked to upgrade my library, and I click on upgrade, but it never finishes. After several minutes of attempting to upgrade, the

  • AD Access Policy Update or Revoke Not Happening

    Hi Problem: I am automating the AD user Provisioning through OIM Access Policy. I am able to provision user in AD, But the provisioned user is not visible in Resources tab. If anything is modified OIM attributes and that are not transferring from OIM