Advertisements

Archive for January, 2015

SOA 12c–Bundle Patches

Oracle released the following patch bundles for SOA 12c till now which can be downloaded from Oracle Support.

SOA Bundle Patch

Patch#

Release Date

Bundle Patch 1 (12.1.3.0.1)

19707784

Jan 2015

Bundle Patch 2 (12.1.3.0.2)

20423408

Apr 2015

Bundle Patch 3 (12.1.3.0.3)

20900599

Jul 2015

Bundle Patch 4 (12.1.3.0.4)

21885138

Oct 2015

Note that, Oracle started releasing BPM bundle patches separately after SOA Bundle Patch 1 and Doc ID 1983445.1 gives you required details on same. Other support notes that may help in this regard.

1485949.1 – SOA 11g and 12c: Bundle Patch Reference
1962904.1 – Special Instructions for upgrade to SOA 12.1.3 and Bundle Patch application

Patch Installation using OPatch

Download the zip file from Oracle Support site and unzip. Update PATH variable to include OPatch path. Read readme file before starting with installation.

optach4

Navigate to patch unzipped location and issue command opatch apply as shown below.

opatch1

opatch2

You can verify patch installation by issuing command opatch lsinventory. This will list down the applied patches.

opatch3

You can find more information on OPatch utility here.

Advertisements

SOA 12c – EDN – Mapping to Custom Topic with AQJMS

We have seen using Custom Topic with WeblogicJMS here and in this post we will see the same using AQJMS.

Creating a new Topic

Run the following script to create new AQ Topic.

define edn_user=dev12c_soainfra
define topic=EDN_AQJMS_CUST_TOPIC
define topic_table=EDN_AQJMS_CUST_TOPIC_TBL

 
begin
  DBMS_AQADM.stop_queue(queue_name => ‘&edn_user..&topic’);
  DBMS_AQADM.drop_queue(queue_name => ‘&edn_user..&topic’);
  DBMS_AQADM.drop_queue_table(queue_table => ‘&edn_user..&topic_table’);
end;
/
begin
  dbms_aqadm.create_queue_table(queue_table => ‘&edn_user..&topic_table’,
                                queue_payload_type => ‘SYS.AQ$_JMS_MESSAGE’,
                                multiple_consumers => true);
  dbms_aqadm.create_queue(queue_name => ‘&edn_user..&topic’,
                          queue_table => ‘&edn_user..&topic_table’,
                          max_retries => 256);
  dbms_aqadm.start_queue(queue_name        =>       ‘&edn_user..&topic’);
end;
/
commit;

Once script is run successfully, verify that AQ Topic and corresponding Queue Table is created as shown below.

aqcusttopic

You can also observe other tables created when you create a new topic.

aqtopictables

Now create a foreign destination in  foreign server EDNAQjmsForeignServer. So navigate to Services –> Messaging –> JMS Modules –> SoaJMSModule –> EDNAQjmsForeignServer –> Configuration –> Destinations in Weblogic Administration console and create as shown below:

aqcust1

Enter a meaningful name and Local JNDI for the topic. And the remote JNDI should be of the format Topics/<<AQ Topic Name>> as shown below.

aqcust2

Click OK and observe the new foreign destination created as shown below.

aqcust3

Modifying Business Event mapping

Navigate to SOA –> soa-infra –> SOA Infrastructure –> Business Events in EM and click JMS Mapping as shown below.

aqmapping

Modify JMS Topic Name to use newly created Topic and click Apply. Typically, you don’t have to create new Connection Factories. Restart the affected composites so that modified JMS mapping will be effective.

For demonstration purpose, here we are modifying the JMS Mapping for CreateOrder Business Event.

aqmodmapping

Raise CreateOrder Business Event and observe log (with OneandOnlyOne consistency level).

[2015-01-12T20:16:20.544+05:30] [soa_server1] [TRACE] [] [oracle.integration.platform.blocks.event.jms2.EdnBus12c] [tid: [ACTIVE].ExecuteThread: ’21’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [userId: <anonymous>] [ecid: 5c9ca2bf-9639-4e37-a951-cb3b9fb7c06c-00000123,0:2] [APP: soa-infra] [J2EE_APP.name: soa-infra] [J2EE_MODULE.name: fabric] [WEBSERVICE.name: RaiseEvent_ep] [WEBSERVICE_PORT.name: execute_pt] [oracle.soa.tracking.FlowId: 20002] [oracle.soa.tracking.InstanceId: 20004] [oracle.soa.tracking.SCAEntityId: 29] [composite_name: EDNConsistencyCheck] [FlowId: 0000KfUb1lY3z0WjLxyGOA1Kgxik000002] [SRC_CLASS: oracle.tip.adapter.fw.log.LogManagerImpl] [SRC_METHOD: log] eis/aqjms/EDNxaDurableTopic EdnBus12c file://wsdl/eis/aqjms/EDNxaDurableTopic-OUTBOUND.wsdl [ eis/aqjms/EDNxaDurableTopic-OUTBOUND::enqueue(part,part) ] – Starting JCA LocalTransaction
[2015-01-12T20:16:20.545+05:30] [soa_server1] [TRACE] [] [oracle.integration.platform.blocks.event.jms2.EdnBus12c] [tid: [ACTIVE].ExecuteThread: ’21’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [userId: <anonymous>] [ecid: 5c9ca2bf-9639-4e37-a951-cb3b9fb7c06c-00000123,0:2] [APP: soa-infra] [J2EE_APP.name: soa-infra] [J2EE_MODULE.name: fabric] [WEBSERVICE.name: RaiseEvent_ep] [WEBSERVICE_PORT.name: execute_pt] [oracle.soa.tracking.FlowId: 20002] [oracle.soa.tracking.InstanceId: 20004] [oracle.soa.tracking.SCAEntityId: 29] [composite_name: EDNConsistencyCheck] [FlowId: 0000KfUb1lY3z0WjLxyGOA1Kgxik000002] [SRC_CLASS: oracle.tip.adapter.fw.log.LogManagerImpl] [SRC_METHOD: log] eis/aqjms/EDNxaDurableTopic EdnBus12c file://wsdl/eis/aqjms/EDNxaDurableTopic-OUTBOUND.wsdl [ eis/aqjms/EDNxaDurableTopic-OUTBOUND::enqueue(part,part) ] – Invoking JCA Outbound Interaction
[2015-01-12T20:16:21.913+05:30] [soa_server1] [NOTIFICATION] [] [oracle.soa.adapter.jms.outbound] [tid: [ACTIVE].ExecuteThread: ’21’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [userId: <anonymous>] [ecid: 5c9ca2bf-9639-4e37-a951-cb3b9fb7c06c-00000123,0:2] [APP: soa-infra] [J2EE_APP.name: soa-infra] [J2EE_MODULE.name: fabric] [WEBSERVICE.name: RaiseEvent_ep] [WEBSERVICE_PORT.name: execute_pt] [oracle.soa.tracking.FlowId: 20002] [oracle.soa.tracking.InstanceId: 20004] [oracle.soa.tracking.SCAEntityId: 29] [composite_name: EDNConsistencyCheck] [FlowId: 0000KfUb1lY3z0WjLxyGOA1Kgxik000002] JMSMessageProducer_produce: Successfully produced message with ID ID:11F4B4F68C6A4B93B6BAB1305CA03C72 to destination jms/fabric/EDNAQjmsCustTopic
[2015-01-12T20:16:21.913+05:30] [soa_server1] [TRACE] [] [oracle.integration.platform.blocks.event.jms2.EdnBus12c] [tid: [ACTIVE].ExecuteThread: ’21’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [userId: <anonymous>] [ecid: 5c9ca2bf-9639-4e37-a951-cb3b9fb7c06c-00000123,0:2] [APP: soa-infra] [J2EE_APP.name: soa-infra] [J2EE_MODULE.name: fabric] [WEBSERVICE.name: RaiseEvent_ep] [WEBSERVICE_PORT.name: execute_pt] [oracle.soa.tracking.FlowId: 20002] [oracle.soa.tracking.InstanceId: 20004] [oracle.soa.tracking.SCAEntityId: 29] [composite_name: EDNConsistencyCheck] [FlowId: 0000KfUb1lY3z0WjLxyGOA1Kgxik000002] [SRC_CLASS: oracle.tip.adapter.fw.log.LogManagerImpl] [SRC_METHOD: log] eis/aqjms/EDNxaDurableTopic EdnBus12c file://wsdl/eis/aqjms/EDNxaDurableTopic-OUTBOUND.wsdl [ eis/aqjms/EDNxaDurableTopic-OUTBOUND::enqueue(part,part) ] – Committing JCA LocalTransaction

In above log, you can clearly observe that Business Event is published in our topic jms/fabric/EDNAQjmsCustTopic and default connection factory is used. You can refer to my previous post on how to generate this EDN log, if required.

You can also try with Guaranteed consistency level and can observe that the connection factory eis/aqjms/EDNLocalTxDurableTopic has been used along with new Topic we created.

SOA 12c – EDN Articles

Following bugs related to EDN have been fixed in the patch bundle (12.1.3.0.1). For the complete list of fixed bugs, one can refer to README of the patch bundle 19707784.

18860738: BACKLOG EVENTS LOST WHEN NEW REVISION OF EDN SUBSCRIBERS DEPLOYED
18632135: UPGRADE OF EDN-JMS BACKLOG EVENTS FROM 11G TO 12C
18710784: INCORRECT STATE FOR EDN SUBSCRIBER AFTER UPGRADE EDNJMSMODE=TRUE

SOA 12c – EDN – Durable Subscribers with AQ JMS

In this post, we will see how Durable Subscribers work when using AQJMS. It’s advised to have a look at previous post to understand on how to switch to AQJMS from default Weblogic JMS.

We will use the following Business Events for demonstration purpose where CreateOrder event has 3 subscriptions and UpdateOrder has 1 subscription and Durable property is set to Yes.

duraaq1

From JMS Mapping shown below, you can find out the JNDI of JMS topic which is jms/fabric/EDNAQjmsTopic.

duraaq2

In WLS Admin Console, navigate to Services –> Messaging –> JMS Modules –> SOAJMSModule –> EDNAQjmsForeignServer –> Destinations and observe Remote JNDI of corresponding JNDI of JMS topic observed in above step. From this, actual AQ topic used by EDN is EDN_AQJMS_TOPIC.

duraaq3

You can observe AQ Topic and corresponding DB table used by EDN to store messages as shown below. Remember to connect to DB using SOAINFRA schema credentials.

duraaqtable

In addition to queue table, following are other DB tables used by EDN and will be created automatically as part of SOAINRA schema creation or when you create any custom AQ topic.

duraaqtable1

Following information is an extract from this documentation and presenting for your quick reference here.

Table name

Description

AQ$_queue_table_name_D Table for storing information about propagations and apply processes that are eligible for processing each event.
AQ$_queue_table_name_E Default exception queue associated with the queue table.
AQ$_queue_table_name_H An index organized table (IOT) for storing dequeue history data.
AQ$_queue_table_name_I An index-organized table (IOT) in the case of multiple consumer queues for dequeue operations.
AQ$_queue_table_name_L Dequeue log table, used for storing message identifiers of committed dequeue operations on the queue.
AQ$_queue_table_name_P Table for storing the captured events that spill from memory.
AQ$_queue_table_name_S A table for storing information about subscribers.
AQ$_queue_table_name_T An index for the queue monitor operations

We will discuss about the important tables below from this list.

AQ$_EDN_AQJMS_TOPIC_TABLE_S

You can query this table to find the Durable subscribers as shown below.

durasubscr

You can also get information about these subscribers in following way.

subscr1

Click on Subscribers. You can observe Consumer Name, Delivery Mode and whether it’s Durable subscriber or not.

subscr

subscr2

EDN_AQJMS_TOPIC_TABLE

This is queue table associated with our AQ and you can observe the messages in this table when you raise a business event. You can also get MSGID from EDN log (refer to this post on how to generate EDN logs).

Following screenshot shows the message created when CreateOrder event is raised.

duramsg1

You can also see event payload  in USER_DATA column as shown below.

duramsg2

AQ$_EDN_AQJMS_TOPIC_TABLE_H

This table contains de-queue history for each of subscribers of an event. The following screenshot shows messages for 3 subscribers of CreateOrder event (observe subscriber# column below).

duramsg3

AQ$_EDN_AQJMS_TOPIC_TABLE_I

This table contains messages meant for de-queue operations for each of subscribers of an event. This we can observe clearly when any of the durable subscribers are down, which we will see later.

It has been observed that the messages are being purged automatically from the above tables, once all subscribers have received the event and successfully processed it.

If the business events are staged in buffer for a period of time without being de-queued, or if there is no enough space in memory to hold all of these captured events, then the tables AQ$_EDN_AQJMS_TOPIC_TABLE_P and AQ$_EDN_AQJMS_TOPIC_TABLE_D are used to store these spilled events.

Now we will observe how these subscribers get affected in the following scenarios:

  • Deployment of composites with Durable property to Yes.
  • Any of the Composites subscribed to business events are shutdown.
  • Redeployment of composites with same revision.
  • Redeployment of composites with different default revision. 
  • Un-deployment of the composites.
  • Redeployment of composites after modifying Durable property to No.

Durable property to Yes:

We have already seen above that subscribers have been created as expected where Subscriber/Consumer name has corresponding Business Event name.

Subscribers Down:

Shutdown one of the composites subscribing to CreateOrder business event. In this case you can observe the records in all of the above tables that we discussed as all subscribers have not processed the event.

durasubscr

EDN_AQJMS_TOPIC_TABLE

subscrdown

AQ$_EDN_AQJMS_TOPIC_TABLE_I

This table shows only one message corresponding to inactive subscriber.

subscrdown1

AQ$_EDN_AQJMS_TOPIC_TABLE_H

This table clearly shows that 2 of the messages related to active subscribers have been de-queued along with de-queue time and one more message is yet to be de=queued as the subscriber is down.

subscrdown2

AQ$_EDN_AQJMS_TOPIC_TABLE_F

This table also shows only one message corresponding to inactive subscriber along with other information present in EDN_AQJMS_TOPIC_TABLE.

subscrdown3

Now bring up the composite and query all of the above tables and you will find them empty as the message is delivered as expected.

Redeployment of Composites:

Redeployment of some composites with same revision resulted into recreation of Durable Subscribers and older ones are either completely deleted or just updated with Deletion Time but Subscriber/ Consumer name is never changed as shown below. Also Subscriber Type is set to 2 denoting UNDELIVERABLE.

subscr3

Same is the case when composites are redeployed with different revision but now Subscriber/Consumer name is also modified as shown below.

subscr4

Un-deployment of Composites:

Un-deployment of composites also resulted into either deletion of entries or Deletion Time and Subscriber Type is updated as described in previous scenario. But could not conclude on why 2 different behaviors exist.

Durable property to No:

Subscribers have been created as expected but Subscriber/Consumer name are set differently as shown below.

durableno

durableno1

Let us bring down the composite down once again to see how it’s affected the subscriber. From the below screenshot, you can observe that corresponding subscribers are marked with Deletion time and Subscriber type is set to 2 means undeliverable.

durableno3

Other Observations:

  • Subscriber Type is 193 in table aq$_edn_aqjms_topic_table_S when subscriber is active and value 2 denotes undeliverable.
  • The message assumes the following states during it’s lifecycle and the column state in table edn_aqjms_topic_table denotes this. These value are derived from definition of DB view AQ$EDN_AQJMS_TOPIC_TABLE.

State

Meaning

0 Ready
1 Wait
2 Processed
3 Expired
8 Deferred
10 Buffered Expired
  • When any one of the composites throws an exception (considering the BPEL invocation is Sync), retry is happening thrice as expected and retry count is marked in aq$_edn_aqjms_topic_table_H as shown below.

        retry

        retry1

Note: Could not conclude the purpose of tables AQ$_EDN_AQJMS_TOPIC_TABLE_F and AQ$_EDN_AQJMS_TOPIC_TABLE_G and AQ$_EDN_AQJMS_TOPIC_TABLE_T . If anybody is aware of the functionality, one can let me know through your comments. And the table AQ$_EDN_AQJMS_TOPIC_TABLE_L showing log only during events delivery and is getting cleared once all events have been processed successfully.


Advertisements

Pages

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 327 other followers

Enter your email address to follow this blog and receive notifications of new posts by email.


%d bloggers like this: