Oracle Blog

Discussions and Examples using Oracle Fusion Middleware

Wednesday May 15, 2013

When working on the ODA patch 2.5 there maybe occasions where you need to VNC into the virtual machine to try and diagnose issues because the standard oakcli doesn't provide enough information. I believe in 2.6 a new function has been a introduced to make this easier (oakcli show vmconsole) but in 2.5 it doesn't exist.

In this example I have deployed WLS on the ODA but one of the managed server machines is not coming up correctly although the command oakcli show vm is saying all is OK.

To get a VNC console to the managed server VM I performed the following.

You need to go the the VM repository. This is on either of the ODA_BASE machines. To find where this is, on the node 0 db vm run the following command:

The server I'm interested in is WLS_ofm_domain_ManagedServer_1, which is found on odarepo2. This tells me I need to go to the repository on ODA_BASE Node 1 (I'm counting from 0). In my case this is called nlab-oda-pub2.

Login as root to the ODA_BASE server that has the required repository. change directory to the following

Please note that yours may differ, I'm connecting to the odarepo2 and vm WLS_ofm_domain_ManagedServer_1

In this directory there should be a file vm.cfg. Open this up and add the following line at the top

vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0']

Bounce the VM with the oakcli commands:

oakcli stop vm WLS_ofm_domain_ManagedServer_1

and

oakcli start vm WLS_ofm_domain_ManagedServer_1

Start a VNC session and point to the correct node. In my case I need to connect to the head machine on the second node (machine you install the ODA_BASE into). The port you need to connect to is 5901 as 5900 is taken by the ODA_BASE machine.

This should op up the console. In this instance I can see that may network was already taken, that is why it didn't start correctly.

19. To integrate Google Maps to ADF we must customise the source to add the Google Maps APIs. Click the source tab of your jspx page.

20. The first bit of code we will implement is the Google Map functions. There are 2 functions we create, an initialisation function, and a an implementation function so when the user selects a row it will pass the coordinates to Google Maps.

Copy this code into your jspx source, just after </af:form> and before </af:document> at the bottom of the source.

Also change the key=ABCD to the key you got when you subscribed to the Google API.

22. The final code is implementing the client listeners for user interaction so when the use selects an ID the location will be shown on the map. To do this we must edit the ID field to listen for user interaction and pass the parameters to the functions implemented in step 20.

Thursday Jun 03, 2010

One of the benefits of ADF is that fact that it can use multiple data sources. With SOA playing a big part in today’s IT landscape, applications need to be able to utilise this SOA framework to leverage functionality from multiple systems to provide a composite application.

ADF provides functionality to expose web services via the ADF Business Component so if you know how to use Business Components for a database. Configuring ADF for web services is much the same.

In this example I use an OSB web service that gets a customer.

Create a new Fusion Web Application (ADF) Application and click OK

Provide an Application Name, GetCustomerADF and click Next

From the Project Technologies move Web Services into the Selected box. Accept the defaults and click Finish.

Right-click the Model project and select New

In the Gallery select Web Services –> Web Service Data Control then click OK.

Provide a name GetCustomerDC and give the URL endpoint for the Web Service, then click Next

Select the web service operation you want to use for the ADF application. In my example my web service only has one operation.

Click Finish

Save your work, File –> Save

The data control has now been created, the next steps create the UI components.

In your application created in step 1 find the ViewController project, right-click and choose New

In the Gallery select JSF –> JSF Page

Provide a name for the jsp page, GetCustomer, Also ensure that the ‘Create as XML Document (*.jsp) check box is checked. I have selected the page template, Oracle Three Column Layout but you can create a layout of your choice.

I only want 2 columns so I delete the last column but right-clicking the right had panel and selecting Delete

Drag the fields you require from the web service data control to the left pannel. In my example I only require the Customer ID. When you drag to the panel select Texts –>ADF Input Text w/Label

In this example I want to search on a customer based on the ID. So Once I select the ID I want to execute the request. To do this I need a button. Drag the operation object under the fields created in step 15. Select Methods –> ADF Button.

You now need to provide the mappings, Choose the ‘Show EI Expression Builder’