Database Reference
In-Depth Information
Exposing EJB through OSB
For the demonstration of the concept, we will create simple EJB using JDeveloper as an
Entity bean and expose it as a Stateless Session bean on OSB. We will not go into the de-
tails as you can find all necessary details in the Oracle documentation or a dozen cook-
books, full of step-by-step instructions and screenshots for every mouse click. Entity beans
are most often based on entities from DB tables, so we can easily use the DBs and DB con-
nections we established in the previous chapter.
Create a new project in the same application we used for offline OER DB analysis (1) . If
you didn't look at the internal OER structure, you can choose any other DB source you
have for test purposes; just one entity table will be enough. Our choice is naturally the As-
set table in the OER schema. While configuring the EJB settings, please select EJB 3.0
(what else?) and invoke the wizard constructing Entity from tables. You have several op-
tions for the DB connection type ( online , offline , and from AppServer ); select
the one most suitable for you. We will proceed with online and select the ASSETS table
(2) after querying OER schema. In any case, go to the persistence.xml file (3) after
EJB generation and change jta-data-source to the correct one you use on your serv-
er (in two places).
Building the Assets entity bean
Search WWH ::




Custom Search