Вы находитесь на странице: 1из 19

EJB Server

Steps to create EJB bean ,home


interface and remote interface
1)File->New Project
2)Choose javaEE and click EJB Module And then click Next.
3)Type the Project Name and Choose Folder.
4)choose J2EE 1.4 as java EE version and click finish.
5)Right Click Project in left Panel choose new and click
Session Bean
6)Enter the EJB Name and package name check only the remote
box and click finish
7)It Automatically create home,remote and bean page
8)Copy code and paste in bean.java
9)Click BankRemote.java and type code
10)Right click project and deploy the project
EJB client

Step to create a client


1)File->New Project
2) Choose Java and click java Application and click Next
3)Choose project name and click finish
4)Right click in library node and select add Jar folder
5)In dialog box,click program files->glassfishv2->lib-
>appserv_rt.jar and j2ee.jar
6)Right click libraries and click add project and click EJB
sever and add project add Jar folder
7)Click java file and copy the code

• Import home and remote interface at the top


• Copy the code
• Set client project as main project and run it.

Вам также может понравиться