| Author |
stateless session bean
|
srikanth arroju
Ranch Hand
Joined: Aug 02, 2006
Posts: 66
|
|
when i deployed the stateless session bean using ant at jboss console its giving this exception java.lang.RuntimeException: No container configured with name 'Stateless Bean'
|
 |
Pavel Kubal
Ranch Hand
Joined: Mar 13, 2004
Posts: 356
|
|
|
Maybe you could post your ant script, it looks like there's something wrong inside.
|
 |
yugant shah
Greenhorn
Joined: Apr 13, 2005
Posts: 4
|
|
Consider a stateless session bean CodebookManagerBean.java. In the ejb-jar.xml we need to specify the transaction type of the bean. For ex: <session id="Session_CodebookManager"> <description><![CDATA[]]></description> <ejb-name>CodebookManager</ejb-name> <home>service.CodebookManagerHome</home> <remote>service.CodebookManager</remote> <local-home>service.CodebookManagerLocalHome</local-home> <local>service.CodebookManagerLocal</local> <ejb-class>service.CodebookManagerBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> </session> Hope this might solve the issue. Thanks. Yugant Shah
|
 |
srikanth arroju
Ranch Hand
Joined: Aug 02, 2006
Posts: 66
|
|
build file <?xml version="1.0"?> <!-- ======================================================================= --> <!-- JBoss build file --> <!-- ======================================================================= --> <project name="JBoss" default="ejbjar" basedir="."> <property file="../local.properties"/> <property environment="env"/> <property name="src.dir" value="${basedir}/src"/> <property name="jboss.home" value="${env.JBOSS_HOME}"/> <property name="jboss.server.config" value="default"/> <property name="build.dir" value="${basedir}/build"/> <property name="build.classes.dir" value="${build.dir}/classes"/> <!-- Build classpath --> <path id="classpath"> <!-- So that we can get jndi.properties for InitialContext --> <pathelement location="${basedir}"/> <fileset dir="${jboss.home}/lib"> <include name="**/*.jar"/> </fileset> <fileset dir="${jboss.home}/server/${jboss.server.config}/lib"> <include name="**/*.jar"/> </fileset> <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer"> <include name="*.jar"/> </fileset> <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/jboss-aop-jdk50.deployer"> <include name="*.jar"/> </fileset> <pathelement location="${build.classes.dir}"/> </path> <property name="build.classpath" refid="classpath"/> <!-- =================================================================== --> <!-- Prepares the build directory --> <!-- =================================================================== --> <target name="prepare"> <mkdir dir="${build.dir}"/> <mkdir dir="${build.classes.dir}"/> </target> <!-- =================================================================== --> <!-- Compiles the source code --> <!-- =================================================================== --> <target name="compile" depends="prepare"> <javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="on" deprecation="on" optimize="off" includes="**"> <classpath refid="classpath"/> </javac> </target> <target name="ejbjar" depends="compile"> <jar jarfile="build/tutorial.jar"> <fileset dir="${build.classes.dir}"> <include name="**/*.class"/> </fileset> </jar> <copy file="build/tutorial.jar" todir="${jboss.home}/server/${jboss.server.config}/deploy"/> </target> <target name="run" depends="ejbjar"> <java classname="example1.Client" fork="yes" dir="."> <classpath refid="classpath"/> </java> </target> <!-- =================================================================== --> <!-- Cleans up generated stuff --> <!-- =================================================================== --> <target name="clean.db"> <delete dir="${jboss.home}/server/${jboss.server.config}/data/hypersonic"/> </target> <target name="clean"> <delete dir="${build.dir}"/> <delete file="${jboss.home}/server/${jboss.server.config}/deploy/tutorial.jar"/> </target> </project>
|
 |
srikanth arroju
Ranch Hand
Joined: Aug 02, 2006
Posts: 66
|
|
how to find a ejb-jar.xml or where to write a ejb-jar.xml
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
Originally posted by srikanth arroju: how to find a ejb-jar.xml or where to write a ejb-jar.xml
ejb-jar.xml is a core component in EJB deployment, it defines what ejbs are contained in your application and sets any configuration required. Its probably worth you taking the time to go through the J2EE tutorial to remind yourself of the basics.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
srikanth arroju
Ranch Hand
Joined: Aug 02, 2006
Posts: 66
|
|
i think in ejb3 ejb-jar.xml is optional [ September 13, 2007: Message edited by: srikanth arroju ]
|
 |
 |
|
|
subject: stateless session bean
|
|
|