Friday, May 6, 2011

Installing Weblogic (3rd party) Libraries using Maven

In my scenario, I am interacting with weblogic JMS queues using Apache Camel. I am using Maven to setup the Camel project in Eclipse. The issue here is that the weblogic (3rd party) libraries are not published in the Maven repo. This causes problems with the build.

In this post, I will describe the steps to configure and install weblogic libraries using maven to successfully execute the project.

Step 1:
For weblogic 10.0 and higher, you need to generate the wlfullclient.jar using the following instructions. (Available here - http://download.oracle.com/docs/cd/E11035_01/wls100/client/jarbuilder.html#wp1077742)

• cd WL_HOME/server/lib
• java -jar ../../../modules/com.bea.core.jarbuilder_X.X.X.X.jar
• wlfullclient.jar is generated in WL_HOME/server/lib

Step 2:
Use Maven install plugin to install the jar files.

• mvn install:install-file -DgroupId=wlclient -DartifactId=wlclient -Dversion=10.3.3 -Dpackaging=jar -Dfile=C:\bea1\wlserver_10.3\server\lib\wlfullclient.jar

I installed 3 jar files using maven.
wl-j2ee-client.jar
wljmsclient.jar
wlfullclient.jar (or) weblogic.jar

Fixes: If you encounter the following error, you need to generate wlfullclient.jar using step 1.
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/management/WebLogicMBean

Tuesday, April 26, 2011

Concurrency Control - Transaction Locking

Transaction isolation can be achieved through locking a resource when it is being accessed.
The two types are Optimistic and pessimistic locking.

Here are few sites with good explanations.
Optimistic vs Pessimistic locking
Strategies for concurrency control


Wednesday, April 20, 2011

Recover Weblogic Password

I happened to lose my weblogic password that I setup a few months earlier.

Since I keep forgetting how to reset/obtain the password, I will use the blog to document it.

The instructions to recover the password can be found here and here.

Location of SerializedSystemIni.dat
- %WL_HOME%\user_projects\domains\base_domain\security

Location of encrypted username and password (boot.properties file)
- %WL_HOME%\user_projects\domains\base_domain\servers\AdminServer\security

Note: There could be multiple SerializedSystemIni.dat and boot.properties file. Point to the correct one.