Kavin's SOA Blog

May 14, 2009

How To Control The Size Of The BPEL domain.log File

1.  Logon to your server and navigate to directory BPEL_HOME/domains/<domain name>/config.

2.  Make a backup copy of the log4j-config.xml file.

3.  Open the log4j-config.xml file for edit.

4.  Change the appender class from com.collaxa.cube.util.CXRollingFileAppender to org.apache.log4j.RollingFileAppender.

5.  Add the property MaxFileSize:

<param value="10MB" name="MaxFileSize" />

Here, a maximum file size of 10MB is specified, but you can make it whatever value suits your environment.  The top of the log4j-config.xml file now looks like:

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender class="com.collaxa.cube.util.CXRollingFileAppender" name="A1">
<param value="true" name="ImmediateFlush" />
<param value="false" name="Append" />
<param value="C:/oracle/ora10g/soasuite/bpel/domains/default/logs/domain.log" name="File" />
<param value="10" name="MaxBackupIndex" />
<param value="10MB" name="MaxFileSize"/>
<layout class="org.apache.log4j.PatternLayout">

6.  Save the file, and restart the BPEL container.

Please note that these changes will be carried forward to any new domain that you create.  If you have already created domains in addition to default, you will need to change the log4j-config.xml file for each of these domains to limit the size of those log files.

April 28, 2009

Restrict User Access To A Specific BPEL Domain With JAZN Security Provider

BPEL PM allows you to have a fine grained user access at domain level. That means that if you want to restrict a user to a domain (or set of domains) then you should be able to perform this task by following these simple steps.

I am assuming that we have a domain called “development” and we want to have users (e.g. “devuser”) with only “devrole” privilege  to have access to this domain.

To achieve this we need to perform two task, first create user, role at application server and then update security realm using enterprise manager console.

To simplify this, i have scripted first half of the task. It basically creates role “devrole”, assigned domain permissions to “devrole”, create user “devuser” and grant role “devrole” to this user.

set OH=C:\oracle\ora10g\soasuite
set JH=%OH%/jdk
set ADMIN_USER=oc4jadmin
set ADMIN_PWD=oc4jadmin
set ROLE_NAME=devrole
set USER_NAME=devuser
set USER_PWD=welcome1
set DOMAIN_NAME=development

%JH%/bin/java -Xbootclasspath/a:%OH%/bpel/lib/orabpel-boot.jar -jar %OH%/j2ee/home/jazn.jar -user %ADMIN_USER% -password %ADMIN_PWD% -addrole jazn.com %ROLE_NAME%
%JH%/bin/java -Xbootclasspath/a:%OH%/bpel/lib/orabpel-boot.jar -jar %OH%/j2ee/home/jazn.jar -user %ADMIN_USER% -password %ADMIN_PWD% -grantperm jazn.com -role %ROLE_NAME% com.collaxa.security.DomainPermission %DOMAIN_NAME% all
%JH%/bin/java -Xbootclasspath/a:%OH%/bpel/lib/orabpel-boot.jar -jar %OH%/j2ee/home/jazn.jar -user %ADMIN_USER% -password %ADMIN_PWD% -listperms jazn.com -role %ROLE_NAME%
%JH%/bin/java -Xbootclasspath/a:%OH%/bpel/lib/orabpel-boot.jar -jar %OH%/j2ee/home/jazn.jar -user %ADMIN_USER% -password %ADMIN_PWD% -adduser jazn.com %USER_NAME% %USER_PWD%
%JH%/bin/java -Xbootclasspath/a:%OH%/bpel/lib/orabpel-boot.jar -jar %OH%/j2ee/home/jazn.jar -user %ADMIN_USER% -password %ADMIN_PWD% -grantrole %ROLE_NAME% jazn.com %USER_NAME%

Second half task is little bit manual, i would try to script it but for the time being lets do it from EM console.

  • Logon to the application server control console, and from the cluster topology, expand the BPEL container. Scroll down and click on orabpel.

image

  • Navigate to Administration -> Security Provider -> Realms

image

  • Click on the number under Roles. Click on Create and add the name you’ve given your new role (e.g. devrole) and check “Grant RMI Login Permission”. Click Apply.

image

  • Go back to the Security Provider page, and click on the number under Users.
  • Click create and enter the name of your user and the password In our example, the user name would be “devuser” and the password “welcome1”.
  • Assign this user the new role “devrole” and Click OK.

image

  • Now, open the system-jazn-data.xml file in directory ORACLE_HOME/j2ee/oc4j_soa/config for edit.
  • In a section titled <jazn-realm> and under that a section labeled <users>. Scroll down and verify that the user you’ve just created on the application server console is listed there.
  • In a section labeled <roles>. Verify that the role you’ve just created is listed there and that your user is listed as a member of this group. (Group and role are synonymous in BPEL.)
  • Scroll down further to the section labeled . Look for the permissions granted to your new role; you will see something like

image

  • We will need to add the domain permission here. So, add the following text replacing domain name with our domain name “development”.

<permission>
    <class>com.collaxa.security.DomainPermission</class>
    <name>DOMAIN_NAME</name>
    <actions>all</actions>
</permission>

  • So it would look like

image

  • Restart the server
  • Try to login as “devuser”. You will see that the console comes up in the domain specified for this user. In the drop down list at the top, the user will be able to see any other domains but will be unable to access them.

March 31, 2009

How to control Default BPEL revision

Filed under: Setup — Tags: , , , — Kavin @ 3:14 pm

By default in BPEL when we deploy new version of BPEL process then the new version becomes default one for that BPEL process. However, there are situations where we want to override this behavior like wanting to keep an working copy as default BPEL version and continue to deploy new  versions with modification.

To achieve desired objective use the property ‘processDeployAsDefault’ in the domain configuration, which  controls which revision will be the default revision.  If set to "true" the  most recently-deployed version of a process is always the default version. If  set to "false" This means that the most recently deployed version of a  process prior to setting this property to false remains the default version.

Please remember this is a”DOMAIN” level configuration so you have to do this exercise for every BPEL domain in question. All you have to do is to modify domain.xml file which is located at <ORACLE_HOME>\bpel\domains\<DOMAIN_NAME>\config\domain.xml and add below mentioned text anywhere within “bpel-domain-descriptor” element.

<property id="processDeployAsDefault">
<name>Process Version Logic </name>
<value>false</value>
<comment><![CDATA[
         If set to "true" This means that the most recently-deployed version
  of a process is always the default version
         If set to "false" This means that the most recently deployed version
  of a process prior to setting this property to false remains the default
  version
  <p/>
         The default value "true".
         <p/>
         ]]>
</comment>
</property>

image

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.