wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Need help regarding EjB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Need help regarding EjB" Watch "Need help regarding EjB" New topic
Author

Need help regarding EjB

DharmiL Sanghvi
Greenhorn

Joined: Sep 14, 2012
Posts: 8
Hello guys.

i Am new to EjB.

i Have to do Library Operations in Ejb.

i Have all the code {RemoteInterface, HomeInterface, eTc.} required to do the coding, but dont know how to implement it.

i Know to how to code in JAva, but EjB has java but its execution is very much different.
i Also installed NetBeans IDE, but still cant figure out how to execute the code.

So can anybody please help me out with this thing ???
How do i execute this EjB code ?
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Hello!

If you have your NetBeans installed it is best for you to learn about EJB on javaee6 tutorial as all examples there are done on NetBeans IDE. To use EJB you will also have
to install server. Javaee6 tutorial recommends Glassfish server.

To read javaee6 tutorial about EJB go to parts IV and V at http://docs.oracle.com/javaee/6/tutorial/doc/javaeetutorial6.pdf
If you have Glassfish server installed on your computer you can find good tutorial on EJB at "..\glassfish3\glassfish\docs\javaee-tutorial\examples\ejb".


True person is moral, false is right!
Ashutosh patico
Greenhorn

Joined: Sep 24, 2012
Posts: 3
Hi Volodymyr Levytskyi,

I installed glassfish server on my machine. It says installed successfully.But,i could find this path " javaee-tutorial\examples\ejb" missing after "..\glassfish3\glassfish\docs\".
Please suggest.

Thanks
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Hello!

You should use updatetool to install examples. You can find updatetool in such places:
1. Start -- All Programs -- Java EE 6 SDK -- updatetool, start application server, stop application server, uninstall. Click updatetool menu item
2. On path http://localhost:4848/. On left sidebar there is a list with title 'Common Tasks'. The last item there is Update Tool. Click on it

In both cases when you are in Update Tool you should click on tab 'Available Add-Ons' or 'Available Updates' and look for 'javaee-tutorial' item in column 'Component'.
Select check box next to this item and click 'Install' button which is above.

Then look for installed tutorial! Maybe path will be slightly different.

P.S For option 2 you must start glassfish server at first. For that go to folder glassfish3/bin and then open asadmin file and type -
start-domain
Ashutosh patico
Greenhorn

Joined: Sep 24, 2012
Posts: 3
Thanks Volodymyr Levytskyi.
It worked.

I have some generic querys like.
1) which one is better ejb 2.1 or ejb 3.0? just confused.
2) which book should i go for ?

Please suggest
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Hello!

I am glas that EJB code works now for you!

You may find this article interesting - http://www.coderanch.com/t/591307/EJB-JEE/java/learn-Servlets-JSP-JSF-JEE

To my mind it is better to start studying javaee with great book on Servlets and JSP! Then you can procede to something like Struts or JSF.
Anyway the best is to start with good foundation about constructing a site. I think that Servlets and JSP, JSTL, SQL is just what future web java developer should start with,
because it is basics for learning more advanced technolgies like struts or jsf.
EJB is business logic of web site. Model of web site is represented by entities which map java classes to tables in database(SQL). Finally view part of site is JSP, JSTL, CSS
Best to study is to take serious, large book with many examples. The more examples you understand the better!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help regarding EjB
 
Similar Threads
Execute Block of code using core java
Need all your guidance
executing ejb code in j2ee
Struts <html:text ... issue.
IO application