Deploy a BPEL composite to SOA Cloud Service from JDeveloper

I searched how to deploy to my SOA Cloud Service from JDeveloper. But I found nothing in the documentation.

Based on the fact that SOA CS is just SOA Suite, I tried do it by forwarding all the SOACS port to my laptop like this:

A. First,I created a ssh tunnel from my laptop to my SOA CS like this:

Note: I use Cygwin SSH and 111.222.333.444 is the public IP address of my SOACS.

B. Then, I added some entries in my host file:
> c:\windows\system32\drivers\etc\host.

I started Notepad in Administrator mode to edit the host file and added a mapping
– oc-111-222-333-444.compute.oraclecloud.com soacs-jcs-wls-1
– to 127.0.0.1 (my laptop)

C. Then I deploy the SOA composite normally from Jdeveloper:

  • Right Click on the project. Choose Deploy, <ProjectName>…
  • Deploy to application Server (Next>)
  • Check “overwrite any existing composites with the same Revision ID” (Next>)
  • Select the server (or add a new one, I called mine SOACS, like this)

Created the connection to SOACS like this:

jdev_application_server_1

  • Choose the newly created application server (SOACS) (Next>)
  • Choose the SOA Server (there is just one) (Finish)

jdev_deploy_1

  • The application is deployed

jdev_deploy_2

Then you can see it and test it from SOACS

Go to cloud.oracle.com/Oracle Soa Cloud Service. Then choose the Fusion Middleware console:

soacs1

Click the tree icon. Navigate in the tree to Soa-Infra.
Click on the deployed instance tab.

soacs2

Click on the composite (here SoaHelloSync). Then click on the Test button. You can test your composite. In my case, this gives this.

soacs3

 

Active Gridlink : how to configure a JDBC gridlink datasource with RAC (12c)

Active Gridlink datasources are JDBC datasources:

  • that connect to a RAC server
  • that are “aware” of the state of the Oracle RAC server at anytime
  • that respond to FAN events to provide
    • Fast Connection Failover (FCF),
    • Runtime Connection Load-Balancing (RCLB),
    • and RAC instance graceful shutdown

What means that whatever happens to your RAC installation, your programs get always a JDBC working connection even when a RAC node brutally dies or that a node is simply shutdown for maintenance. Better, when the RAC node restart, the JDBC pool get balanced to use the restarted node.

Here is how to configure it:

1. Installation

You need to have :

  • a RAC installation of at least 2 nodes (mine is version 12.1.2.0.2)
  • a JDeveloper or Weblogic installation to configure the JDBC Gridlink  datasource (mine is JDeveloper 12.1.3)
  • a java code sample to check if it works ( GridLinkTest )

If you do not have such install, you follow an blog like this one, to install RAC on VirtualBox.

2. Schema of the installation

3. Check the RAC installation:

First, let’s see if the RAC is working.

  • The database is called “racdb”.
  • It is not a PDB database.
  • It is running on 2 rac nodes racdb_1 and racdb_2
  • The nodes are on machine rac1 and rac2.
  • They are started.

You can also check the database listener:

  • The database service name is racdb

And the ONS service:

The ONS service is started on port 6200 on 192.168.56.21 (rac1) and 192.168.56.22 (rac2).

4. Create the datasource

Go in Weblogic console,

  • for a standalone WLS: something like http://machine:7001/console,
  • or for JDeveloper: http://machine:7101/console

Then in the menu, click Data Sources

0_create_datasource

Click New /  GridLink Data Source

In step 1: “JDBC GridLink Data Source Properties”
  • Name of the connection : jdbc/gridlinkDS
  • JDNI name: jdbc/gridlinkDS
  • Database driver:
    *Oracle’s Driver (Thin) for GridLink Application Continuity Connections; Versions:Any
  • Click Next

1_create_datasource

In step 2: “Transaction Options “
  • Keep the default (one phase commit) and Next
In step 3: “GridLink data source connection Properties Options”
  • Check: Enter complete JDBC URL
  • Click Next
In step 4 : “connection properties”
  • JDBC URL :

Notice:
1) I use the JDBC DESCRIPTION format
2) the HOST NAME is the SCAN hostname. The port and service name are the one we found above (1521 and racdb)

  • username: scott
  • password: tiger
  • Click Next

2_create_datasource

In step 5 “Test GridLink Database Connection”
  • Click “Test All Listeners” (it should work)
  • Click Next
In step 6 “ONS Client Configuration”
  • We will enter the ONS server found above
    ONS host and port:
    192.168.56.21:6200  (Click Add)
    192.168.56.22:6200  (Click Add)
  • Click Next

4_create_datasource

In step 7 “Test ONS client configuration “
  • Click “Test All ONS Nodes” (it should work)
  • Click Next
In step 8 “Select Targets”
  • Select the managed server where you will run the program.
    In my case, it is the DefaultServer of the integrated WLS of JDeveloper

5_create_datasource

  • Click Finish

5. Deploy the test application:

Here is the source of the program and the war file: GridLinkTest

  • Please download it.

You can run it from JDeveloper. Or deploy the WAR file from the WLS console:

  • Go to WLS console : http://machine:7001/console
  • In the domain structure, click deployment
  • Click Install
  • Choose the war file (WLSWeb.war) and deploy it

6. Test

Test 1 – With 2 rac nodes started
  • Go to http://machine:port/WLSWeb/TEST/gridlinkTest.html
  • Set Data Source Location to : jdbc/gridlinkDS
  • Connections to retrieve : 10

6_test_start

  • Click “Test JDBC Gridlink Data Source”

You will see that some of the connections are on rac1 and some on rac2. Ex:

8_test_1_2

Test 2 : stop RAC node 2

Go to the SSH console of your RAC installation.
Stop the node racdb_2.

Go back to http://machine:port/WLSWeb/TEST/gridlinkTest.html

  • Same input than above
  • Click “Test JDBC Gridlink Data Source”
  • You will see only rac1 connections.

8_test_after_stop

If you set up ONS debugging, you will see in the Weblogic log a lot of new log entries like

Test 3 : Restart the node rac2

Go back to http://machine:7001/WLSWeb/TEST/gridlinkTest.html

  • Same input
  • Click Test JDBC Gridlink Data Source
  • You will see rac1 and rac2 connections.

8_test_after_restart

Documentation:

  1. https://docs.oracle.com/middleware/1213/wls/JDBCA/gridlink_datasources.htm
  2. http://www.lab128.com/rac12_installation_using_vb/article_text.html#check_internet_access

 

 

 

Continuous development with Oracle Java Cloud Service and Developer Cloud Service

When you have a project in JDeveloper and a Java Cloud Service, you can use Developer Cloud Service to

  • store your code as remote git repository
  • to build automatically the code at commit time
  • and to deploy it to a Java Cloud Service (Weblogic in the cloud) if the build is successful.

You can do it like this:

  1. In JDeveloper (or manually), create a local git repository.
    Menu : Team / Git / Initialise
  2. Add all the files of the JDeveloper application to the git repository
    Menu : Team / Git / Add all…
  3. Commit to the local repository
    Menu : Team / Git / Commit all…
  4. In DCS, Create a remote git repository in Developer Cloud Service
    Copy the HTTPS url of the repository in a text editor, you will need it later.ex: https://xxx@developer.em2.oraclecloud.com/xxx/s/xxx_workbetter/scm/wb.git
    1.https_url
  5. Add a build.
    • Go to main tab “Build”
    • Click “New Job”
    • In Subtab “Main”, give a name, for ex: BuildWorkBetter
    • In Subtab “Source Control”, choose the GIT repository created in step 4
    • In Subtab “Triggers”, check the “Based on SCM polling schedule” checkbox to allow automatic compilation when the DCS GIT repository is modified. Leave the schedule empty.
    • In Subtab “Build Step”, set the way to build the program, for example
      • Add Build Step : ant
      • Set Targets : deploy
      • Set Build File : build.xml
    • In Post Build, define the artifacts (the result of the build)
      • Check “Archive the artifacts
      • File to archive. This is the place where for example your ear and war file will be created. Ex: ViewController/deploy/*3_post_build
  6. In JDeveloper, push the local GIT repository of JDeveloper to the remote repository in DCS.
    Menu : Team / Git / Push …
    – URL use the https url of step 4
    – username: use your cloud user name
    – password: use your cloud password
    Click Next
    Click Finish
  7. Back in DCS,
    In the tab “Code”,  you will see that your code is now in GIT.
    1.codeIn the tab “Build”, you will see that the code is being build.2.build

    If it compiles, you will see the list of artifacts in build tab.

  1. In DCS, click on the tab “Deploy” and click “New Configuration”
    • Configuration name : DeployWB
    • Application
    • Deployment Target (New Java Cloud Service)
      • Protocol SSH Tunnel
      • Host: your Java Cloud Service Admin Server IP (1)4_JCS
      • HTTPS: 7002
      • Adminitration Port : 9001
      • username : <<weblogic user>>
      • password : <<weblogic password>>
    • Type: automatic
    • Job : BuildWorkBetter
    • Artifact : select the .ear file
  2. Click “Save”

4_deploy

  1. IN JCS, you can check that the deployment has succeed. Log in to the Weblogic Server Console. Go to deployment, look for your deployed project.
  2. Get the URL of your external IP, probably a load balancer (2)
    Check that it works.https://<load balancer IP>/<Application URL>

Compiling a JDeveloper project on Developer Cloud Service

In the current version of Developer Cloud Service, it is not possible to compile directly a JDeveloper project.

But there is a work-around by using an ANT script and odeploy.

Press the little down arrow, next to the project name and click “New…” / “Gallery”

1 - new ant script

Then select “Buildfile from Application”.

In the application resources, you will find a build.xml and build.properties.

You need to change them like this:

And build.properties, need to look like this:

Deepmind

I have always being interested in IA. And it seems the Deepmind bought by Google created a program that get better result than previous types of neural network.

They did release a paper and a part of their demo code. Here is how I tried to install it.

 

….