Home
Every EJB has some business methods that can be called after looking up the EJB by it’s JNDI name. To call a business method it should be declared in Remote Interface and the related EJB should have it’s definition. Manually adding a method to a EJB is not an easy task for a J2EE programmer. NetBeans provides an easy way for adding a business method to EJB so that it will be added to Remote Interface and EJB automatically. After adding business method you just have to write business logic in EJB class. Other configuration task will be handled by NetBeans.
Here are the steps to be followed.
Assume you have a session bean named JavaTipsSessionBean already created in IDE. Right click on related EJB module and select “Business Method” option.
You will see the following screen.
Now add method name, parameters etc. Click “OK”. Code will be added to bean and to the Remote Interface.
Now cursor will be automatically prompted to the business method in bean class, so that you can write your logic there.
When this EJB will be deployed. Any remote client will be able to call this method.
Related Posts:
Introduction to Stateful Session Bean In NetBeans
Calling A Session Bean Using A Web Module
Calling a Stateful Session bean in NetBeans
Developement Of Enterprise Applications in NetBeans IDE
Override Methods In NetBeans IDE
Creating JUnit Test Cases using NetBeans
How To Add Fields And Generating Getter-Setters
Generating JavaDoc For a Project In NetBeans IDE
Creating J2ee Modules In NetBeans IDE
Introduction
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Adding Business Methods to an EJB in NetBeans
Name (required)
Mail (will not be published) (required)
Website
Anti-spam word (required)
Application Frameworks (0)
C/C++ Pack (0)
Debugging (0)
Java EE (8)
Java ME (0)
Java SE (0)
NetBeans IDE (10)
NetBeans Platform (0)
News (0)
Plugins (0)
Profiler (0)
Web Services (0)
Subscribe in a reader
Enter your email address to subscribe to NetBeans Blog by Email:
NetBeans
August 2007 (4)
July 2007 (3)
April 2007 (7)
March 2007 (4)
Login
Copyright 2006 - 2007 NetBeans Blog. All rights reserved.