This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB" Watch "EJB" New topic
Author

EJB

hemapriya raag
Greenhorn

Joined: Jul 09, 2007
Posts: 4
Hi All,
I have a doubt on EJB Home interfaces,And I am new to EJB ,I am refering Headfirst EJB and using Netbean IDE for learning.I am able to create a session bean and remote interface but not able to create Home interface, I also refered http://www.netbeans.org/files/documents/4/442/J2EE-NBTutorial.pdf and I followed the instruction as said
=============================================================
Creating the ConverterBean Enterprise Bean
The enterprise bean templates automatically create all of the classes and interfaces

necessary for the enterprise bean and register the enterprise bean in the

EJB module's deployment descriptor.

1. In the Projects window, right-click the ConverterApp-EJBModule node

and choose New

→Session Bean.
2. In the EJB Name field, type

Converter. In the Package field, type converter.
Set the bean to be stateless and remote and click Finish.

C

REATING THE CONVERTER BEAN ENTERPRISE B EAN 129
The IDE creates the following classes:



ConverterBean.java. The enterprise bean class. All of the EJB infrastructure
methods are generated automatically and are hidden in a code

fold.



ConverterRemote.java. The remote interface . The remote interface usually
defines the business methods that a client can call. The business methods

are implemented in the enterprise bean code. Because the IDE enforces

best coding practices, it actually registers all of the business methods in a

remote business interface, which the remote interface extends.



ConverterRemoteBusiness.java. The business interface . Presently this
class is empty, but as we add business methods to the bean this class will

be populated.



ConverterRemoteHome.java. The home interface. A home interface
defines the methods that allow a client to create, find, or remove an enterprise

bean.

================================================

but not able to create ConverterRemoteBusiness.java and ConverterRemoteHome.java .
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

Which version of Netbeans are you using? My NetBeans always generates the home, remote, remote business, and the bean. Try to download the latest one, 5.5 (stable) and see if it's working.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

hemapriya,

Welcome to the ranch. Could you please read the Naming Policy and change your name accordingly ? You must have both first and last name. Thank you


[My Blog]
All roads lead to JavaRanch
hemapriya raag
Greenhorn

Joined: Jul 09, 2007
Posts: 4
I have loaded the latest one 5.5..
I go file--> new project--->EJB module then it creates ejb module
then right on ejb module-->new session bean(adive)-->stateless-->remote then it creates only a adviceBean and AdviceRemote
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

hemapriya,
please do not ignore my post. Would you please adjust your name ? You can read the details at the Naming Policy page. Thank you.
 
 
subject: EJB
 
Similar Threads
Implements
EJB 2.0 - Local - Remote
Runtime problem with Session Bean
Cleared SCBCD last week.. some notes
My SCEA Part 1Study Notes