Tuesday, July 17, 2012

What is T3, soadirect, sb? When to use them?

Weblogic installation provides a range of standalone client that access WebLogic Server applications range from simple command-line utilities that use standard I/O to highly interactive GUI applications built using the Java Swing/AWT classes.

T3: RMI communications in WebLogic Server use the T3 protocol to transport data between WebLogic Server and other Java programs, including clients and other WebLogic Server instances. A server instance keeps track of each Java Virtual Machine (JVM) with which it connects, and creates a single T3 connection to carry all traffic for a JVM.  

SOADIRECT: The SOADIRECT transport provides native connectivity between Oracle Service Bus and Oracle SOA Suite service components. Oracle SOA Suite provides a "direct binding" framework that lets you expose Oracle SOA Suite service components in a composite application, and the Oracle Service Bus SOA-DIRECT transport interacts with those exposed services through the SOA direct binding framework, letting those service components interact in the service bus layer and leverage the capabilities and features of Oracle Service Bus.

SB Transport: SOA Suite can invoke Oracle Service Bus proxy services with an SB transport binding, including the transaction and security context using the direct binding reference.
You can google for more details on each of them. Now, all of the above internally uses RMI/t3 for protocol for communication   But, I could not find any specific internals about how t3 works and most importantly how to load balance these using software/hardware load balancer. In this blog, I will reveal the details that I got from the experts:

1.  Can you loadbalance t3 connections?

You cannot explicitly load balance t3 connections. So, even if you put a hardware/software loadbalancer in front of SOA/OSB/Weblogic cluster it would not help. Yes, the initial connection request will go through the load balancer (only as part of connection establishment i.e. as an alternative to DNS round-robin) but after the intial connection is established, it will stay for the lifetime of the server or client. Once a connection(t3) is established, it consistently goes routes back to the same server directly without going through the loadbalancer. If the connection fails, the loadbalancer doesn't attempt to re-establish it. Responsibility for failover and reconnection remains with the t3 protocol itself.

2. What happens when the client/SOA/OSB requests a t3/soadirect/sb connection?

In general, t3 takes care of its own load balancing (stateless stubs will round-robin calls; stateful stubs will be sticky, with appropriate failover), but requires unfettered access to establish connections to the target servers. Further, once a client has made a connection to one node in the cluster, it learns about all cluster members (regardless of the contents of the URL used to connect); and is actively notified of the member health so it will rarely try to contact a server that is not running. T3 is a stateful protocol; once a connection has been established, the LB cannot re-route it. Responsibility for failover and reconnection must remain with the RMI stub.

3. What happens if the connection is dropped?

Once the channel (t3) is established, the two endpoints will issue regular heartbeats and keep the connection alive.

4. how can you loadbalance your t3 connections?


No, you cannot loadbalance them so it is recommended to not use it until you need to propogate transactions as t3 provides transactional capabilities. You may some link specifying that soadirect/sb/t3 is faster than regular http/ws but I would recommend don't believe it until you test it in your environment.

Bottom line: Use sb/soadirect/t3 only if you need to propogate transactions between end systems else don't use it!!

Tuesday, July 10, 2012

SOA, OSB and Weblogic Performance Tuning

I have compiled this document with references to various links/documents/guides illustrating performance tuning for SOA, OSB and Weblogic infrastructure:
  • Performance Tuning Guide
     [http://docs.oracle.com/cd/E23943_01/core.1111/e10108/toc.htm]
  • Tuning Your SOA Infrastructure for Performance and Scalability OOW 2011[http://www.oracle.com/technetwork/middleware/soasuite/learnmore/odtugsoaperformancetuningsession-427186.pdf]
  • SOA Suite Performance Tuning Presentation OOW 2010 [http://www.oracle.com/technetwork/middleware/soasuite/soaperformancetuning-176286.pdf]
  •  [http://www.oracle.com/technetwork/database/features/availability/soa11gstrategy-1508335.pdf]
  • Oracle SOA Suite 11g WP on DB-RAC Configuration [http://www.oracle.com/technetwork/database/focus-areas/availability/maa-fmw-soa-racanalysis-427647.pdf]
  • JVM Memory Monitoring, Tuning, Garbage Collection, Out of Memory, and Heap Dump Analysis For SOA Suite Integration 11g (Doc ID 1358719.1)
  • Oracle Fusion Middleware Performance and Tuning for Oracle WebLogic Server 11g [http://download.oracle.com/docs/cd/E21764_01/web.1111/e13814.pdf]
  • Oracle Fusion Middleware Performance and Tuning Guide (This one include SOA and OSB) [http://download.oracle.com/docs/cd/E21764_01/core.1111/e10108.pdf]

Friday, July 6, 2012

Oracle Service Registry Installation Issue (Error 500 Internal Service Error)

If you are trying to install OSR 11g in a domain that has OSB or SOA managed servers configured, you will run into one of the issues as below:

java.lang.LinkageError: Class javax/xml/namespace/QName violates loader constraints
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
 at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
 Truncated. see log file for complete stacktrace

org.idoox.wasp.WaspInternalException: java.lang.RuntimeException: Updates to config files not supported
 at com.systinet.wasp.WaspImpl.boot(WaspImpl.java:399)
 at org.systinet.wasp.Wasp.init(Wasp.java:151)
 at com.systinet.transport.servlet.server.Servlet.init(Unknown Source)
 at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 Truncated. see log file for complete stacktrace
Caused By: java.lang.RuntimeException: Updates to config files not supported
 at com.idoox.config.xml.XMLConfigurator.updateConfigFile(XMLConfigurator.java:720)
 at com.idoox.config.xml.XMLConfigurator.prepareConfigFile(XMLConfigurator.java:570)
 at com.idoox.config.xml.XMLConfigurator.init(XMLConfigurator.java:423)
 at org.idoox.config.Configurator.init(Configurator.java:65)
 at com.systinet.wasp.WaspImpl.boot(WaspImpl.java:359)
 Truncated. see log file for complete stacktrace

The reason for this issue is the conflict among the classpath jars and the solution is as below:
Replace the snippet in setDomainEnv.sh/cmd where POST_CLASSPATH variable is created as below (sample from SOA +OSR and same applies to OSB+OSR):

if NOT "%SERVER_NAME%"=="osr_server1" (
 set POST_CLASSPATH=%SOA_ORACLE_HOME%\soa\modules\oracle.soa.fabric_11.1.1\oracle.soa.fabric.jar;%SOA_ORACLE_HOME%\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-wls.jar;%SOA_ORACLE_HOME%\soa\modules\oracle.soa.adapter_11.1.1\oracle.soa.adapter.jar;%SOA_ORACLE_HOME%\soa\modules\oracle.soa.b2b_11.1.1\oracle.soa.b2b.jar;%POST_CLASSPATH%
 set POST_CLASSPATH=%DOMAIN_HOME%\config\soa-infra;%SOA_ORACLE_HOME%\soa\modules\fabric-url-handler_11.1.1.jar;%SOA_ORACLE_HOME%\soa\modules\quartz-all-1.6.5.jar;%POST_CLASSPATH%
 set POST_CLASSPATH=%COMMON_COMPONENTS_HOME%\modules\oracle.xdk_11.1.0\xsu12.jar;%BEA_HOME%\modules\features\weblogic.server.modules.xquery_10.3.1.0.jar;%SOA_ORACLE_HOME%\soa\modules\db2jcc4.jar;%POST_CLASSPATH%
 set POST_CLASSPATH=%UMS_ORACLE_HOME%\communications\modules\usermessaging-config_11.1.1.jar;%POST_CLASSPATH%
 set POST_CLASSPATH=D:\SOA\installations\11g6\tempInstallation\Oracle_SOA1\soa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;%POST_CLASSPATH%
 set POST_CLASSPATH=%COMMON_COMPONENTS_HOME%\soa\modules\commons-cli-1.1.jar;%COMMON_COMPONENTS_HOME%\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;%POST_CLASSPATH%
) else (
 set POST_CLASSPATH=""
)

Basically, you need to remove all the jars from the POST_CLASSPATH for the OSR managed server. This is bug [Patch 9499508] as reported on oracle support.

Search This Blog