0

EJB3.x with JBoss AS 7: Session Beans and the Remote Clients

EJB2.x is a long way toward EJB3.x. A lot has been changed since 2.x. Major overhaul.  However, most 2.x basics still hold true when developing or supporting EJB3.x applications.

Software applications used:
1. JBoss AS 7.1 – www.jboss.org/jbossas/downloads/
2. WinXP running on a virtual machine (e.g., Virtual Box)
3. JDK 1.6.0_21
4. Eclipse Ganymede

Download, Install, and Run JBoss AS 7

Install JDK in WinXP running on some virtual machine so as not to affect your current host system. Next, download JBoss AS 7.1 (or latest), extract it to some appropriate directory, and run it using <JBOSS_HOME>/bin/standalone.bat. You may need to add an admin user the first time you access the web console.

jboss-as-7-1-001

Extracted JBoss AS to some directory

jboss-as-7-1-0022

RunningJBoss AS using standalone.bat

 

jboss-as-7-1-003

JBoss AS Web Console

The Stateless Session Bean Code

The Stateful Session Bean Code

The Remote Interface – for both Stateless and Stateful Session Beans

jboss-ejb-client.properties file

Jar files needed for both the beans and their remote clients

Jar files needed for both the beans and their remote clients

The Clients codes

Stateless Session bean client

 The Stateful Session Bean Client