Wednesday, July 27, 2011

How to Remove Contents from MDS Repository

In 11g we can publish artifacts and commonly used schema, wsdl's in a meta data store to acccess across processes.

Often we realize that sometime we need to clean up and remove unnecessary and unwanted files from the repostiory.

There are two ways you can remove contents from MDS offline mode and online mode. I will explain both the options below

Option 1: Offline Mode


Step 1: Execute wlst.sh
Goto YOUR_MIDDLEWARE_HOME/Oracle_SOA1/common/bin and execute wlst.sh
Step 2: Run Command
At wlst command prompt (wls:/offline>) execute the following

sca_removeSharedData('http://yourhost:yourport', 'directory', 'adminuser', 'adminpassword')

To remove a folder named "common" folder and all it's sub-directories and files.

sca_removeSharedData('http://localhost:8001', 'common', 'weblogic', 'weblogic1')


Option 2: Online Mode


Step 1: Execute wlst.sh
Goto YOUR_MIDDLEWARE_HOME/Oracle_SOA1/common/bin and execute wlst.sh

Step 2: Connect to SOA server
At wlst command prompt (wls:/offline>) execute the following

connect('adminuser', 'adminpassword', 't3://hostname:port')

ex:
connect('weblogic', 'weblogic1', 't3://localhost:8001')

Step 2: Remove Content from MDS

deleteMetadata(application='soa-infra',server='soa_server1',docs='/apps/common')

Friday, May 06, 2011

Using Preferences / Deployment Descriptors in 11g

About this post
In 10g most of us used Deployment Descriptors in bpel processes. In 11g those are still available but their implemenation and definition places changed due to composites and weblogic applicaiton server. This post talks about how to use and manage these preferences in 11g.

Step 1: Add preferences property to composite.xml


Open composite.xml in source mode

Add the property "bpel.preference.kalyanpref"

Take a look at the above property closely it has 3 sections 1) bpel 2) preference 3) Name of the preference.

When you access in bpel you would access like ora:getPreference('kalyanpref')

Following code snippet shows how you add this property in composite.xml

<component name="DemoPreferencesBPEL"version="1.1">
<implementation.bpel src="DemoPreferencesBPEL.bpel"/>
<property name="bpel.preference.kalyanpref">kalyan</property>
</component>


Step 2: Where to Access / Update this preference


Access to this preference is available on Descriptor tab in 10g, but in 11g it's available in MBean browser.

Go to Enterprise Manager (http://localhost:7001/em)

Navigate "Farm"->"Weblogic Domain"->Right Click On "Your SOA Domain"->"System MBean Browser"



In the MBean Browser Window click on "oracle.soa.config"->soa_server1->SCAComposite->Demo Preferences->SCAComposte.SCAComponent->DemoPreferencesBPEL


On the Right hand side click on "properties"




You can update the values here and click on Apply to take effect.

Thursday, March 31, 2011

11g : Starting Managed Server with boot.properties

When you start your Managed Server there is a prompt for Weblogic Username and Password. You can avoid this by creating a properties file with the username and password to avoid typing everytime.

Creating boot.properties

Step 1

Create file boot.properties with the following content
username=weblogic
password=welcome1

Step 2

Place the boot.properties under your managed server directory
For ex: /user_projects/domains/kalyan_domain/servers/soa_server1/security
If security folder is not available create one and place the file under that.

Alternative

You can also pass parameter
"-Dweblogic.system.BootIdentityFile=path_to_your_file" to JAVA_OPTIONS variable in your setDomainEnv.sh file

Wednesday, January 05, 2011

Oracle 11g : Problem Restarting Weblogic Servers


Problem Restarting Weblogic Admin and Domain Servers


You may see an error while restarting Weblogic Servers, after a forceful shutdown and sudden system reboot.

In order to restart the server you need to delete the following files

*.lok files
*.DAT files

look under all the directories where weblogic server installed remove these files and restart..