• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB 3 In Action- Session Bean example

 
Balaji Anand
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I extracted the RemoteInterface ,Bean and the client compiled them separately
Created a jar with RemoteInterface and bean.
Deployed the jar to the server with the Name :HelloUser

Now... How do i run the client? I am using Glassfish

Thanks
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srividhya,

you have 2 possibilities :

1.You can use the ant script from the EJB in action (http://www.manning.com/panda/)
2.You can use the publish features from your IDE
3.You can build your own deploy-publish ant script

I'll recommended you to start with the 2'th option until you get confident with the EBJ.

Regards,
M
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Srividhya Anand:
hi,

I extracted the RemoteInterface ,Bean and the client compiled them separately
Created a jar with RemoteInterface and bean.
Deployed the jar to the server with the Name :HelloUser

Now... How do i run the client? I am using Glassfish

Thanks


In eclipse simply create a java project and write your main method as usual and call your RemoteInterface...
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jothi,

If you choose the eclipse like ide you'll need JEE (not the standard distribution).
More you need to configure eclipse to work with your application server.

Take a look at :
https://glassfishplugins.dev.java.net/
or more precisely at :
https://glassfishplugins.dev.java.net/eclipse33/index.html

Regards,
M
 
Balaji Anand
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i installed only the Glassfish hoping to do everything by myself...
I tried "ant deploy" from the EJB 3in action it fails with
----------
Buildfile: build.xml

BUILD FAILED
C:\NoBackup\Java\EJB\Action\Session\build.xml:9: Cannot find ../common.xml impor
ted from C:\NoBackup\Java\EJB\Action\Session\build.xml

Total time: 0 seconds
----------
Ok which IDE shd i go with now?
something simple and does the job?
[ September 29, 2008: Message edited by: Srividhya Anand ]
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srividhya,

The Glassfish is only the application server -> this it the server where your applications runs.
To develop your applications you need an IDE. For the moment two are disputing the "best ide for JEE" title, the Eclipse and Netbeans.
The IDE wall do the deploy for you. After your application is deploy on the app server you can run a client (which connects with the serve) and see if it works.
You can do the entire process by hand - with some ant files- but if you are on the beginning you'll get easy lost.

Regards,
M
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic