Thursday, January 19, 2012

Startup behavior of SOA Suite 11g

You can startup SOA Suite 11g in any number of ways...

1. Via the command line:
oracle@soahost1:/u01/app/oracle/Middleware/user_projects/domains/soa_domain/bin> nohup ./startManagedWebLogic.sh soa_server1 http://soahost1:7001 &
2. Or via the Oracle WebLogic Server Administration Console:

Note the following behavior regarding the startup of the SOA managed server:
  • All composites move from an "Unknown" state to an "Up" state as the server is starting up.
  • Composites are not loaded in a specific order, thus you cannot guarantee the order in which composites are loaded.
  • The SOA server does not start serving requests until all composites are loaded.
  • It is not guaranteed that a composite will move from the "Unknown" to "Up" state; a composite may not be able to start up and may remain in an "Unknown" state (for example, in the event that a target service or schema is unavailable).
You can log in to Oracle Enterprise Manager Fusion Middleware Control to view the status of the composite loading:

Only after all composites are loaded, SOA Suite 11g is ready to accept incoming requests. This can be confirmed in the soa_server1.out log file as shown:
INFO: DeploymentEventPublisher.invoke Publishing deploy event for default/HelloWorld1!1.0*soa_21c519b0-d9df-466e-a21d-1817324374ee 
INFO: DeploymentEventPublisher.invoke Publishing deploy event for default/HelloWorld2!1.0*soa_d8ececcf-400c-420f-9b77-d5a398cd1683
INFO: FabricKernelInitializerServlet$1.run Composite Auto Deployment directory set to /u01/app/oracle/Middleware/user_projects/domains/soa_domain/soa/autodeploy 
INFO: FabricProviderServlet.stateChanged SOA Platform is running and accepting requests

Ahmed Aboulnaga

4 comments:

Rafael Andrade said...

Hi Ahmed,

I reach your post because I was trying to understand composite load order.

In the post you say that "Only after all composites are loaded, SOA Suite 11g is ready to accept incoming requests". However, I have a composite that is started not through HTTP, but using an MQAdapter. This composite, just after load, start the MQ listener and begin to read and process messages from the queue, not waiting all composites to load. As this composite call another composite one, if the second composite is not loaded, I get an exception because the called composite is not accepting requests.

Do you know if there is a way to delay the first composite to register itself as MQ listener and start dequeueing messages only after all composites are loaded and accepting requests?

Do you have any other suggestion about what I can do to avoid issues in my first composite, as there is not way to define the composite load order?

Thanks in advance,
Rafael

Anonymous said...

Good point Rafael. I forgot about that.

I vaguely recall reading somewhere that inbound adapters are immediately active when they're started up, but I can't remember where I read that from.

Here are a few quick workaround options:

(1) Turn off consumption on the MQ. Once the SOA server is up, turn it back on.

(2) Modify your composite to consume the message from the MQ and immediately produce it to a WebLogic JMS queue. Consider creating this as a Mediator for performance reasons. Then have a separate composite that reads from the JMS queue and then calls that second composite. So before you start up the SOA server, make sure that consumption on the JMS queue is turned off. Once the SOA server is up, turn on consumption of the JMS queue, then data will start flowing normally.

(3) Make sure that your consuming service is a BPEL process. On failure when invoking the not-yet-started composite, catch the error and dump the payload to your own custom exception JMS queue. You can handle what's in the JMS queue in many ways after that.

(4) Create a fault policy that handles the exception, and set retries and retry intervals. Not a good solution because the SOA server may be overloaded with retries and a lot of the retries may eventually fail anyway.

From the looks of it, option 2 may be the best option. If I think of anything else, I'll post it here.

Sudheer said...

Hi Ahmed,

Good and useful Article.

I was facing the same issue as Rafael. But in my case, i am using AQ adapter in my parent soa composite.

Can we load parent composite after all child composites are loaded?

@Rafael,
Is your issue got resolved. If so could you please share the resolution.

Thanks,
Sudheer

Unknown said...

Hi Ahmed ,

i need to identify the composite which are still in UNKNOWN state. i need this information without login to EM console.

i tried to get using MBeans but i am getting composite status is up only even the composite is in unknown state..