Tuesday 19 January 2016

Using SKIP LOCKED feature in DB Adapter polling

Last few days I spent with describing a Throttle mechanism using the DB Adapter. Today the 'Distributed Polling' functionality of the DB Adapter was mentioned to me, which uses the SKIP LOCKED clausule of the database.

On one of the pages you'll get to check the 'Distributed Polling' option:
Leave it like it is, since it adds the 'SKIP LOCKED' option in the 'FOR UPDATE' clausule.

In my example screendump I set the Database Rows per Transaction, but you might want to set in a sensible higher value with regards to the 'RowsPerPollingInterval' that you need to set yourself in the JCA file:

The 'RowsPerPollingInterval' is not an option in the UI, unfortunately. You might want to set this as a multiple to the MaxTransactionSize (in the UI denoted as 'Database Rows per Transaction').

A great explanation for this functionality is this A-Team blogpost. Unfortunately the link to the documentation about 'SKIP LOCKED' in that post is broken. I found this one. Nice thing is that it suggests using AQ as preferred solution in stead of SKIP LOCKED.

Maybe a better way for throttling is using the AQ Adapter together with the properties

Tuesday 12 January 2016

End of last november I wrote about the BPM 12cR2 quickstart download, describing that the links weren't updated. For a new install I did a new download and found that in the meantime the links are updated.
You can download the quickstart here.

Thanks Oracle.

Wednesday 6 January 2016

Automatic install of JDeveloper

A few weeks ago I wrote a little script to do a silent install of SOA/BPM QuickStart.
Yesterday I enhanced the script to also do an automatic install of Java and adapt the environment settings to have the JDeveloper settings specific placed in C:\Data\JDeveloper\SOA.

To run the script you should have the following files placed in one folder (for instance c:\temp\soabpm):
Download the jdk-8u65-windows-x64.exe from here. If you use another version adapt the script below to change the JAVA_HOME as the place where it should be installed and the reference to the installer (jdk-8u65-windows-x64.exe) to the version. The script below ignores any other installation of Java (either an other update of jdk8 or earlier versions).

Using the 'setx' command  (see docs) the JAVA_HOME is explicitly set, and also later on the variables JDEV_USER_DIR_SOA and JDEV_USER_HOME_SOA pointing to C:\Data\JDeveloper\SOA. I picked the jdev.boot from an earlier install adapted the ide.user.dir.var variable as follows:

#
# The ide.user.dir.var specifies the name of the environment variable
# that points to the root directory for user files.  The system and
# mywork directories will be created there.  If not defined, the IDE
# product will use its base directory as the user directory.
#
ide.user.dir.var = JDEV_USER_HOME_SOA,JDEV_USER_DIR_SOA

A copy of this jdev.boot file I placed in the same folder as the script. The scripts sets the FMW_HOME as 'C:\oracle\JDeveloper\12210_BPMQS'. After the install of JDeveloper-SOA/BPM QuickStart, it copies this jdev.boot file to the right place in the FMW_HOME (%FMW_HOME%\jdeveloper\jdev\bin).
Make sure that you have the installer jar files (fmw_12.2.1.0.0_bpm_quickstart.jar and fmw_12.2.1.0.0_bpm_quickstart.jar) unzipped in the same folder. You could have downloaded them in zip files. You can use this script also to do a complete silent install of the JDeveloper Studio Edition, but then use the generic installer downloaded here (Oracle JDeveloper 12c 12.2.1.0.0 Generic/Others(2.1GB)).

The installBpmQS.bat script is as follows.
@echo off
set JAVA_HOME=c:\Program Files\Java\jdk1.8.0_65
echo setx -m JAVA_HOME "%JAVA_HOME%"
setx -m JAVA_HOME "%JAVA_HOME%"
echo JAVA_HOME=%JAVA_HOME%
rem Check Java
if exist "%JAVA_HOME%" goto :JAVA_HOME_EXISTS
echo Install %JAVA_HOME% 
jdk-8u65-windows-x64.exe /s INSTALLDIR="%JAVA_HOME%"
:JAVA_HOME_EXISTS
echo %JAVA_HOME% exists
rem check BPM12.2 QS
set FMW_HOME=C:\oracle\JDeveloper\12210_BPMQS
if exist "%FMW_HOME%" goto :BPMQS_HOME_EXISTS
echo Install %FMW_HOME% 
rem echo "Current dir2:" %~dp0
echo "Silent install BPM QuickStart, using response file:" %cd%\bpmqs1221_silentInstall.rsp
"%JAVA_HOME%\bin\java.exe" -jar fmw_12.2.1.0.0_bpm_quickstart.jar -silent -responseFile %cd%\bpmqs1221_silentInstall.rsp -nowait
:BPMQS_HOME_EXISTS
echo %FMW_HOME% exists
if not exist c:\Data mkdir c:\Data
if not exist c:\Data\JDeveloper mkdir c:\Data\JDeveloper
if not exist c:\Data\JDeveloper\SOA mkdir c:\Data\JDeveloper\SOA
rem set  JDEV_USER_DIR_SOA and JDEV_USER_HOME_SOA as 'c:\Data\JDeveloper\SOA'
echo set  JDEV_USER_DIR_SOA and JDEV_USER_HOME_SOA as c:\Data\JDeveloper\SOA
setx -m JDEV_USER_DIR_SOA c:\Data\JDeveloper\SOA
setx -m JDEV_USER_HOME_SOA c:\Data\JDeveloper\SOA
echo copy jdev.boot naar "%FMW_HOME%\jdeveloper\jdev\bin"
copy jdev.boot "%FMW_HOME%\jdeveloper\jdev\bin" /Y
echo done

For completeness, the content of the response file is:
[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true

#
MOS_USERNAME=

#
MOS_PASSWORD=<secure value="">

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=

#
SOFTWARE_UPDATES_PROXY_SERVER=

#
SOFTWARE_UPDATES_PROXY_PORT=

#
SOFTWARE_UPDATES_PROXY_USER=

#
SOFTWARE_UPDATES_PROXY_PASSWORD=<secure value="">

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=C:\oracle\JDeveloper\12210_BPMQS
Save this as bpmqs1221_silentInstall.rsp. If you use this for the installation of JDeveloper Studio Edition or any other version of JDeveloper, then adapt the name, also in installBpmQS.bat above, and adapt the FMW_HOME/ORACLE_HOME in both installBpmQS.bat and the response-file.

I could have enhanced this script to put the possible points to change in variables. But I think with my eloboration you should get the point...