ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Bruce Lynes <dly...@shaw.ca>
Subject JBoss 2.4.4 Taskdef
Date Sat, 23 Nov 2002 05:23:10 GMT
Sorry I hadn't posted it earlier.  I've just been quite busy, and forgot to 
post.

All that is needed to add to an Ant build script to use this taskdef, 
currently is something similar to the following:

<taskdef name="jbossejb" classname="org.apache.tools.ant.taskdefs.JbossEjb" />
<jbossejb bindingRoot="hr2/ejb" headDir="${hr.src.dir}"
                  outputPath="${dump.dir}">
  <fileset dir="${hr.src.dir}">
    <include name="com/essc/oa/ejb/**/*.java" />
    <include name="com/essc/hr/ejb/**/*.java" />
    <exclude name="**/bean/*.java" />
  </fileset>
</jbossejb>

As you can see, it's quite simple to use.  It currently only supports 
stateless session beans, but supporting stateful session beans wouldn't 
require much more work.

A sample ejb-jar.xml file generated for one EJB is:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created by JBossEJB ant task on 02-11-22 -->
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 
2.0//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">
<ejb-jar>
	<description>hr2/ejb</description>
	<display-name>hr2/ejb</display-name>
	<enterprise-beans>
		<session>
			<ejb-name>HROrganizationManager</ejb-name>
			<home>com.essc.hr.ejb.HROrganization.HROrganizationManagerHome</home>
			<remote>com.essc.hr.ejb.HROrganization.HROrganizationManagerRemote</remote>
			
<ejb-class>com.essc.hr.ejb.HROrganization.HROrganizationManagerBean</ejb-class>
			<session-type>Stateless</session-type>
			<transaction-type>Bean</transaction-type>
		</session>
	</enterprise-beans>
	<assembly-descriptor>
		<security-role>
			<description>This role represents everyone who is allowed full access to 
the beans.</description>
			<role-name>everyone</role-name>
		</security-role>
	</assembly-descriptor>
</ejb-jar>


A sample jboss.xml file generated for one EJB is:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created by JBossEJB ant task on 02-11-22 -->
<!DOCTYPE jboss PUBLIC "-//JBoss/DTD JBOSS//EN" 
"http://www.jboss.org/j2ee/dtd/jboss_2_4.dtd">
<jboss>
	<enterprise-beans>
		<session>
			<ejb-name>HROrganizationManager</ejb-name>
			<jndi-name>hr2/ejb/HROrganizationManager</jndi-name>
		</session>
	</enterprise-beans>
</jboss>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message