As an experiment I tried deploying the interest example bean and running
the client not as said in the Manual (from the examples/build dir) but
from my root dir. To my surprise I needed to have all sorts of container
related jar files in my classpath to run the client. Could this be right
or am I missing something?
- to compile all I needed was ejb.jar. Makes sense.
Why does my client need the following jars to run?
- jnpserver.jar to get an org.jnp.interfaces.NamingContextFactory
- jboss.jar to get org.jboss.ejb.plugins.jrmp13.interfaces.HomeProxy
- jta-spec1_0_1.jar to get javax.transaction.TransactionManager
- jboss-jaas.jar to get org.jboss.security.SecurityAssociation
Does this mean my clients all have to know about all these jars? That
doesn't sound right. I must be missing something. Could someone please
enlighten me here?
Here's my build file, just in case.
Thanks,
boz
----- from my modified ant build.xml -----
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Interest Build Script" default="ejb-jar" basedir=".">
<property name="build.dir" value="${basedir}/classes"/>
<property name="src.dir" value="${basedir}"/>
<property name="jboss.dist"
value="/Applications/java/JBoss-2.2.2_Tomcat-3.2.2/jboss"/>
<property name="classpath"
value=".:${jboss.dist}/lib/ext/ejb.jar:${jboss.dist}/lib/ext/jnpserver.jar:
${jboss.dist}/lib/ext/jboss.jar:${jboss.dist}/lib/ext/jta-
spec1_0_1.jar:${jboss.dist}/lib/jboss-jaas.jar"/>
<target name="compile">
<mkdir dir="${build.dir}"/>
<javac srcdir="${src.dir}"
destdir="${build.dir}"
debug="on"
deprecation="on"
optimize="off"
>
<classpath path="${classpath}" />
<include name="*.java" />
</javac>
</target>
<!-- Tutorial ejb jar -->
<target name="ejb-jar" depends="compile">
<delete dir="${build.dir}/META-INF"/>
<mkdir dir="${build.dir}/META-INF"/>
<copy file="${src.dir}/ejb-jar.xml"
todir="${build.dir}/META-INF" />
<jar jarfile="${build.dir}/interest.jar">
<fileset dir="${build.dir}">
<include name="org/jboss/docs/interest/Interest.class" />
<include
name="org/jboss/docs/interest/InterestHome.class" />
<include
name="org/jboss/docs/interest/InterestBean.class" />
</fileset>
<fileset dir="${build.dir}">
<include name="META-INF/ejb-jar.xml" />
</fileset>
</jar>
</target>
<target name="deploy" depends="ejb-jar">
<copy file="${build.dir}/interest.jar"
todir="${jboss.dist}/deploy" />
</target>
<target name="run-client" > <!-- depends="compile" -->
<java classname="org.jboss.docs.interest.InterestClient"
fork="yes">
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="${build.dir}"/>
</classpath>
<sysproperty key="java.naming.factory.initial"
value="org.jnp.interfaces.NamingContextFactory" />
<sysproperty key="java.naming.provider.url"
value="jnp://localhost:1099" />
</java>
</target>
</project>
-----------------------------------------------------
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user