• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

stateless session bean

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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'
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you could post your ant script, it looks like there's something wrong inside.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to find a ejb-jar.xml
or where to write a ejb-jar.xml
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
srikanth arroju
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think in ejb3
ejb-jar.xml is optional
[ September 13, 2007: Message edited by: srikanth arroju ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic