Deployment Presentation Services Project (OTN's Tutorials ) to remote OC4J instance
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 1 of 1

Thread: Deployment Presentation Services Project (OTN's Tutorials ) to remote OC4J instance

  1. #1
    Join Date
    Aug 2005
    Posts
    16

    Deployment Presentation Services Project (OTN's Tutorials ) to remote OC4J instance

    Deployment Presentation Services Project (OTN's Jdeveloper Tutorial Pages ) to remote OC4J instance on Linux Box (CentOS 4.1).

    Version with screenshots may be viewed at:

    http://bderzhavets.blogspot.com/2006...-services.html

    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:-

    public void setServerSession(Server serverSession)
    {
    //this.serverSession = serverSession;
    ServerSession aSession = (ServerSession)SessionManager.getManager().getSession("ServerSession");
    }

    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

    References:

    1.Create Business Services using Enterprise JavaBeans
    http://www.oracle.com/technology/obe...sservices.html
    2.Create Presentation Services Using JSP pages, Struts and ADF Databinding
    http://www.oracle.com/technology/obe...onservices.htm
    Attached Images Attached Images
    Last edited by dbaxps; 02-07-2006 at 07:16 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width