I am having the same problems as Kay. My xml file seems to have been named correctly so I can't see what the problem would be. Classpath?
CODE HelloWorldHome.java package com.mastertech.sample;
/**
* HelloWorldHome provides the container the means to
* create and destroy
EJB's.
*/
public interface HelloWorldHome extends javax.ejb.EJBHome
{
HelloWorld create() throws java.rmi.RemoteException,
javax.ejb.CreateException;
}
HelloWorldBean.java package com.mastertech.sample;
import javax.ejb.SessionContext;
/**
* This class is the actual implementation of the business
* logic. This is the EJB for simplicity's sake.
*/
public class HelloWorldBean implements javax.ejb.SessionBean
{
private SessionContext ctx;
public void setSessionContext(SessionContext ctx)
{
this.ctx = ctx;
}
public void ejbRemove()
{
System.out.println( "ejbRemove()" );
}
public void ejbActivate()
{
System.out.println( "ejbActivate()" );
}
public void ejbPassivate()
{
System.out.println( "ejbPassivate()" )
}
HelloWorld.java /**
* The method called to display the
string "Hello World!"
* on the client.
*/
public String hello()
{
System.out.println( "hello()" );
return "Hello World!";
}
}
package com.mastertech.sample;
/**
* This is the remote interface that the client calls to
* have the EJB do the work.
*/
public interface HelloWorld extends javax.ejb.EJBObject
{
public String hello() throws java.rmi.RemoteException;
}
ejb-jar.xml <?xml version="1.0" encoding="UTF-8" ?>
- <ejb-jar>
<description>
JBoss Hello World Application</description>
<display-name>Hello World EJB</display-name>
- <enterprise-beans>
- <session>
<ejb-name>Hello</ejb-name>
<home>com.mastertech.sample.HelloWorldHome</home>
<remote>com.mastertech.sample.HelloWorld</remote>
<ejb-class>com.mastertech.sample.HelloWorldBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
TRACE: 10:20:09,681 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
-3.0.0_tomcat-4.0.3/server/default/deploy/HelloWorld.jar
10:20:10,172 INFO [EJBDeployer]
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the
Java cla
ss that implements the enterprise bean's business methods.
10:20:10,212 INFO [EJBDeployer]
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterpri
se bean's home interface in the home element.
10:20:10,312 INFO [EJBDeployer]
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterpri
se bean's remote interface in the remote element.
10:20:10,372 INFO [EjbModule] Creating
10:20:10,382 INFO [EjbModule] Deploying Hello
10:20:10,702 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single
:J2EEApplication= ,J2EEServer=Single,j2eeType=EJBModule,name=HelloWorld.jar