following are code files: package ejb3inaction.example;
import javax.ejb.Stateless;
@Stateless
public class HelloUserBean implements HelloUser {
public void sayHello(String name) {
System.out.println("Hello " + name + " welcome to EJB 3 In Action!");
}
}
package ejb3inaction.example;
import javax.ejb.Remote;
@Remote
public interface HelloUser {
public void sayHello(String name);
}
Thanks !
What are the steps to create and deploy EJB application?
-- Pratik.
Jaikiran Pai
Bartender
Joined: Jul 20, 2005
Posts: 5439
posted
Which application server do you use? Usually, you will find tutorials for deploying the EJBs in the application server documentation. The JavaEE guide is also a good starting point
Pratik Patil
Greenhorn
Joined: Dec 20, 2009
Posts: 3
posted
I am using JBoss 5.0 and Eclipse Galilo.
I have created new EJB project and source file which I have posted(Pl refer my first post).
When I do --> run on server --> I am getting error for persistance .xml .
Now, Pl tell me how to configure persistance.xml for MySql database.
And pl re correct my deployment steps if I am missing anything.
-- Pratik.
Jaikiran Pai
Bartender
Joined: Jul 20, 2005
Posts: 5439
posted
Pratik Patil wrote:I am using JBoss 5.0 and Eclipse Galilo.
I have created new EJB project and source file which I have posted(Pl refer my first post).
When I do --> run on server --> I am getting error for persistance .xml .
I personally never use IDEs to run the applications. So i won't be able to help there. If you are looking for tutorials on building, deploying and running EJB3 examples on JBoss, then follow the docs here
nav katoch
Ranch Hand
Joined: May 02, 2008
Posts: 232
posted
Hi Pratik,
This will help you a lot "Mikalai Zaikin's SCBCD 5.0 Guide, also available in Word and PDF format". The appendix of this guide will show you everything you need for your application.