Introduction to Stateful Session Bean In NetBeans

30 July 2007

In previous blog Creating J2ee Modules in NetBeans IDE we got the basic knowledge about creating EJB-Module in NetBeans IDE.

Here we will learn to create a stateful session Bean using NetBeans IDE.

  1. Click on EJB module and select New -> Session Bean, You will see following screen.
  2. netbeans_31071001.jpg

  3. As we are going to create a stateful session bean so select session type as stateful.In create interface option you can select the type of interface you want to generate for your Stateful Session Bean, Select the appropriate option and Click “Finish”.Classes will be generated in IDE.
  4. netbeans_31071002.jpg

  5. Collapse “Enterprise Beans”.You will see Stateful Session Bean added to the IDE. Right Click on bean you can see two option one for create method and other for business method.
  6. netbeans_31071003.jpg

  7. As we are going to code a stateful session bean, Hence we will add a create method first so as we can maintain state of client, Fill the information in IDE,code will be generated in remote interface and Bean class.
  8. netbeans_31071004.jpg

  9. Now we will add Business Methods to the Bean using add option on previous screen. This option will add business methods to bean and remote interface as well.
  10. netbeans_31071006.jpg

  11. After adding create/business methods, you can add/edit Java code for these methods in EJB class in Editor.
  12. netbeans_31071007.jpg

  13. Now your Stateful Bean is completed, you can deploy it using J2ee Container so that you can call it in your application further.

del.icio.us:Introduction to Stateful Session Bean In NetBeans digg:Introduction to Stateful Session Bean In NetBeans spurl:Introduction to Stateful Session Bean In NetBeans wists:Introduction to Stateful Session Bean In NetBeans simpy:Introduction to Stateful Session Bean In NetBeans newsvine:Introduction to Stateful Session Bean In NetBeans blinklist:Introduction to Stateful Session Bean In NetBeans furl:Introduction to Stateful Session Bean In NetBeans reddit:Introduction to Stateful Session Bean In NetBeans fark:Introduction to Stateful Session Bean In NetBeans blogmarks:Introduction to Stateful Session Bean In NetBeans Y!:Introduction to Stateful Session Bean In NetBeans smarking:Introduction to Stateful Session Bean In NetBeans magnolia:Introduction to Stateful Session Bean In NetBeans segnalo:Introduction to Stateful Session Bean In NetBeans gifttagging:Introduction to Stateful Session Bean In NetBeans

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: Introduction to Stateful Session Bean In NetBeans

Leave a Reply