Database Reference
In-Depth Information
Now we can create Session bean
(1)
and expose the operation(s), which we later will in-
troduce using OSB Proxy. Start the
Session bean
wizard, create the
AssetService
bean
and expose only one operation
getAssetFindAll()
for brevity
(2)
. Create local and
remote interfaces for this bean (using default settings in the interfaces section). It will be
also useful to create separate deployment profiles for EJB JAR and Client JAR (navigate
to
[Project Root]
|
Project Properties
|
Deployment
|
New
)
(3)
.
Building the Assets session bean
A single function in
AssetServiceBean
,
List<Assets> getAssetsFindAll()
, can be used
directly by Client or OSB Callout. However, it would be better to create one more Java
class in the EJB project, accepting output from this function, do the simple alteration in a
list, and return it (we will do the filtering of
Assets
,
getRuleAssets()
, but you can use
your own implementation). Also, please copy the EJB's JNDI name from the
Client
class as shown in the following code snippet; we will use it later in the OSB:
AssetService assetService =
(AssetService)context.lookup("ESR-ServiceModel-AssetService#fusion.esr.model.ejb.AssetService");
Deploy the
Client
class as a jar. It will be used in the OSB Business Service (copy it to
the JAR OEPE project folder).
Search WWH ::
Custom Search