Modify file :-
C:\JDEV10gR2\jdev\mywork\BusinessServices\TopLinkObjects\Project\toplink-mapping.mwp
to replace "localhost:1521:ORCL" with real connecting string to remote database .
For example : "ServerCentOS41:1523:rawdbase"
Then start Jdeveloper 10.1.2 and open project ToplinkObjects.jws
Just to be able to acquire remote Server Session add view :-
create view TeamDriverID as
select a.id,a.constructorname,b.homeCountry,b.yrsExperience,b.name,b.salary
from team_order a,drivers b
where a.driver1_id=b.id
order by a.constructorname
to RACING schema.
Import View TeamDriverID as Toplink Java object to PersistenceServices.jpr
Regenerate toplink Deployment Descriptor.
Create new session.xml and define data control for TeamDriverID.java though session.xml file
Performing following step from [1] :-
Add a Method to Get a Server Session
1.In the EJB Diagram, double-click racingFacade EJB to launch the EJB Module editor.
2.Expand racingFacade in the left hand navigator and select Methods. On the right hand side panel ,
choose Business Methods in the Method category and click Add.
3.In the Business Method Details dialog set the following:
Name getServerSession
Return Type oracle.toplink.threetier.Server
// Deselect the check boxes for Expose through Remote Interface and Expose through Local Interface.
And Do select the check boxes for Expose through Remote Interface and Expose through Local Interface.
Click OK, then click OK in the EJB Module Editor.
4.Right-click racingFacade EJB in the Applications Navigator and choose Go To Bean Class from the context menu.
Following section of RacingFacadeBean.java should be modified as follows:-
Then testing RacingFacadeClient1.Java will successfully add row to "team_order" table on remote database server.
Proceed with working on project as advised in [1],[2]
Create ejb1.deploy as EJB deployment profile for BusinessServices.jpr for standalone OC4J
Create webapp1.deploy as WAR deployment profile for PresentationServices.jpr for standalone OC4J
Create application1.deploy as EAR deployment profile for PresentationServices.jpr for standalone OC4J
Application Assembly should include both ejb1.deploy,webapp1.deploy.
At this point project may be deployed to remote OC4J instance or OAS10gR2 (J2EE & WebCashe) on Linux Box
and work with remote box hosting Oracle 9i or 10g database on Linux,exactly as it works with local
database on Windows