Wednesday, September 26, 2007

Using TopLink native sequencing in an ESB/BPEL project

In ESB and BPEL projects you can use and configure a database adapter to, among others, insert data into a database. TopLink is used to implement this. In the generated TopLink mappings you can specify if you want to use sequencing, either native sequencing or a sequence table. If you want to use Oracle database sequences you need to:
  • Create the database sequence(s) in the Oracle database.
  • Select “Use Native Sequencing” in the “Database Info” tab of the TopLink map.
  • For each entity for which you want a field to be generated using sequences: configure the database sequence name and the entity fields which need to be populated. This can be done in the “Use Sequencing” tab of the Toplink mapping for that entity.
Finally, make sure that:
  • The preallocation size in the TopLink map is equal to the increment by value of the Oracle database sequence.
  • The TopLink sequencing settings match those of the Database Adapter Connection Factory settings configured in the OC4J container. This one can be tricky, since for “normal” Java/JEE projects you probably do not need to configure this.

Friday, September 7, 2007

How to enable the Enterprise Manager for SOA Suite

I found out that for some reason, on Linux the EM is not configured to start after installation of SOA Suite on Oracle Application Server 10.1.3.1 For those of you who want to use the Enterprise Manager, follow the following steps to get the EM started:

Be careful when editing files, make sure you have made a backup of the files.

  1. Edit the file: default-web-site.xml in the $OC4J home/config folder
    Search for the following line and change ohs-routing from false to true
    application="ascontrol" name="ascontrol" load-on-startup="true" root="/em" ohs-routing="true"
  2. Edit the file: server.xml in the $OC4J/home config folder
    Search for the following line and change start van false in true
    application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="true"
  3. That’s all. Just restart your Oracle Application Server:
    $ORACLE_HOME/opmn/bin/opmnctl stopall
    $ORACLE_HOME/opmn/bin/opmnctl startall
  4. Now you should be able to browse to the Enterprise Manager.
    http://servername:[http_port]/em
If you for some reason forgot the http port, just look at the file:
$ORACLE_HOME/install/readme.txt

Saturday, September 1, 2007

How to get the password of ORASSO

If you need a password of some exotic user you never heard of before, like ORASSO, chances are you are configuring Oracle Single Sign On of some Application Server release.

About five years ago I found out this trick the hard way. I say the hard way because there are similar users like ORASSO. The first time I needed the user orasso. I got on the internet and found out where to look, as you can read here. Then I needed the user orasso_[xyz] again. So I looked again. But the password didn’t work. Ok, there are more users here and some times you need a similar one like I did that day. The user orasso_[xyz] looked to me the same but it isn’t.

But now here’s the way to find out the user passwords which Oracle uses to log in to the Repository.

  1. Start the tool OIDADMIN.
    On Linux:
    - be sure you have a X-Server application (eg. Kea!X, Exceed etc.) running on you’re pc.
    - log on to the Linux box (I mostly use the program putty.exe for this)
    - export DISPLAY=[i .p. address of XP machine]:0 (syntax varies for other shells)
    - $ORACLE_HOME/bin/oidadmin
  2. Log on with cn=orcladmin
  3. In the left frame you need to click trough the following following entries:
    Entry Management
    cn=OracleContext
    cn=Products
    cn=IAS
    cn=IAS Infrastructure Databases
    orclReferenceName=[infrastruct_db_servicename]
    OrclResourceName=ORASSO

The orclpasswordattribute text box on the OrclResourceName=ORASSO tab contains the schema password.

You can also use ldapsearch to get the password. For more info, you can check the Oracle Application Server Single Sign-On Administrator’s Guideracle site.