Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > XDoclet not generating proper deployment descriptors

Thread Tools

XDoclet not generating proper deployment descriptors

Posts: n/a
How come my jndi-name an display-name values posted in * is
not passed unto the ejb-jar.xml file when running xdoclet.

* Created on Feb 9, 2004
package com.caritos.sample.ejb;

import javax.ejb.*;

* @ejb:bean type="Stateless"
* name="com.caritos.sample.ejb.HelloBean"
* jndi-name="HelloBean"
* display-name="EJB HelloBean"
public class HelloBean implements SessionBean {
public void ejbCreate() {

public void ejbRemove() {

public void ejbActivate() {

public void ejbPassivate() {

public void setSessionContext(SessionContext ctx) {

public String hello() {
return "Hello, World!";


<?xml version="1.0"?>

<project name="EJB Xbean" default="ejb-jar" basedir=".">

<!-- Init -->
<target name="init">

<property name="lib.dir" value="lib" />

<property name="src.dir" value="src" />
<property name="generated.src.dir" value="gen-src" />

<property name="java.dir"
value="D:/eclipse/workspace/SampleEJB/src/com/caritos/sample/ejb" />
<property name=""
value="${generated.src.dir}/java" />

<property name="config.dir" value="config" />
<property name="build.dir" value="build" />
<property name="dist.dir" value="dist" />

<property name="build.compiler" value="modern" />
<property name="name" value="receiver-xbean" />

<!-- Set up local paths -->
<path id="ejb.classpath">
<fileset dir="D:/sandbox/xdoclet-1.2/">
<include name="*.jar"/>
<fileset dir="D:/sandbox/jboss-3.2.3/server/default/lib/">
<include name="*.jar"/>
<pathelement location="D:/eclipse/workspace/ampleEJB/ThirdParty/xdoclet-1.2.jar"/>
<pathelement location="D:/eclipse/workspace/ampleEJB/ThirdParty/log4j-1.2.8.jar"/>
<pathelement location="D:/eclipse/workspace/ampleEJB/ThirdParty/ant.jar"/>

<!-- Prepare -->
<target name="prepare" depends="init">

<mkdir dir="${build.dir}" />

<mkdir dir="${build.dir}/ejb" />
<mkdir dir="${build.dir}/ejb/META-INF" />

<mkdir dir="${build.dir}/j2ee" />
<mkdir dir="${dist.dir}" />

<mkdir dir="${generated.src.dir}" />
<mkdir dir="${}" />


<!-- Run EJBDoclet -->
<target name="ejbdoclet" depends="prepare">

<taskdef name="ejbdoclet"

destdir="${}" ejbspec="1.1">

<fileset dir="${java.dir}">
<include name="" />

<deploymentdescriptor destdir="${build.dir}/ejb/META-INF"/>

<jboss version="2.4" xmlencoding="UTF-8"
<webSphere destdir="${build.dir}/ejb/META-INF" />


<!-- Compile -->
<target name="compile" depends="ejbdoclet">

<!-- Compile EJBs -->
<javac srcdir="${java.dir};${}"


<!-- Create EJB-JAR file -->
<target name="ejb-jar" depends="compile">

<jar jarfile="${build.dir}/j2ee/${name}-ejb.jar"
basedir="${build.dir}/ejb" />


<!-- Clean everything -->
<target name="clean" depends="init">

<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${generated.src.dir}" />



Generated ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN" "">

<ejb-jar >

<description><![CDATA[No Description.]]></description>
<display-name>Generated by XDoclet</display-name>


<!-- Session Beans -->
To add session beans that you have deployment descriptor info
for, add
a file to your XDoclet merge directory called session-beans.xml
that contains
the <session></session> markup for those beans.

<!-- Entity Beans -->
To add entity beans that you have deployment descriptor info
for, add
a file to your XDoclet merge directory called entity-beans.xml
that contains
the <entity></entity> markup for those beans.


<!-- Assembly Descriptor -->
<assembly-descriptor >
To add additional assembly descriptor info here, add a file to
XDoclet merge directory called assembly-descriptor.xml that
the <assembly-descriptor></assembly-descriptor> markup.

<!-- transactions -->

<!-- finder transactions -->

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating proper classes with XSD.exe Kees de Winter ASP .Net 2 02-02-2007 08:26 PM
Maven2 and XDoclet : org.xdoclet.plugin.web.TaglibPlugin don't generate TLD inherited attributes Greg Java 0 05-17-2006 07:37 AM
Enterprise Library deployment problem. Why needs to InstallUtil DLLs to the deployment server? If not, Registry Error whould shown. Benny Ng ASP .Net 0 10-03-2005 05:40 AM
Generating the proper url D. Alvarado Java 0 10-25-2004 07:53 PM
XDoclet and generating Dependent Value Classes Sigmund Lundgren Java 0 05-26-2004 07:58 PM