Using EJB Components

Follow this guidelines when using EJB components on you BPM projects.

To access your EJB service from PBL you first use standard component Fuego.Ejb.EJBHome to locate the Home interface of your EJB. Using the Home interface, you create a new reference to your Bean.

Example

// Obtain generic reference to an EJB Home object.
// Note: "calculator_ejb" is the name of the External Resource
// defined in your project for "CalculatorHome"
home as Any = EJBHome.locate(configuration : "calculator_ejb")

// Cast
calculatorHome as CalculatorHome = CalculatorHome(home)

// Create reference to EJB object
calculator = create(calculatorHome)

// Use the object
display "5+5="+ makeSum(calculator, arg1 : 5, arg2 : 5)


// dispose the EJB object
calculator.remove();