Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 13 by be.lietaus: Wrong RA entity bound to same object name
http://code.google.com/p/jain-slee/issues/detail?id=13
What steps will reproduce the problem?
1. Configure two RA entities with different link names (JDBC RA example):
<ra-entity
resource-adaptor-id="ResourceAdaptorID[name=JdbcResourceAdaptor,vendor=org.mobicents,version=1.0]"
entity-name="test_entity_1">
<properties/>
<ra-link name="TestRaOne" />
</ra-entity>
<ra-entity
resource-adaptor-id="ResourceAdaptorID[name=JdbcResourceAdaptor,vendor=org.mobicents,version=1.0]"
entity-name="test_entity_2">
<properties/>
<ra-link name="TestRaTwo" />
</ra-entity>
2. Create a service with two SBBs(e.g root & child) each of them
respectively binding to a single RA entity defined in previous step.
Use identical resource-adaptor-object-name for both
(e.g. "slee/resources/jdbc/1.0/sbbinterface").
// for SBB1
<resource-adaptor-entity-binding>
<resource-adaptor-object-name>slee/resources/jdbc/1.0/sbbinterface</resource-adaptor-object-name>
<resource-adaptor-entity-link>TestRaOne</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
// for SBB2
<resource-adaptor-entity-binding>
<resource-adaptor-object-name>slee/resources/jdbc/1.0/sbbinterface</resource-adaptor-object-name>
<resource-adaptor-entity-link>TestRaTwo</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
3. Do a context lookup for RA entity in each of the SBBs and check if the
entity bound is the same as specified in descriptor.
(e.g. check entity name)
Context ctx = (Context) new InitialContext().lookup("java:comp/env");
ra = (JdbcResourceAdaptorSbbInterface)
ctx.lookup("slee/resources/jdbc/1.0/sbbinterface");
// ... code to check RA entity name here ...
What is the expected output? What do you see instead?
Every SBB should receive it's own bound entity (SBB1 - "test_entity_1",
SBB2 - "test_entity_2").
However SBB2 receives "test_entity_1" (the same entity as the first one).
This behaviour is wrong based on
Jain SLEE 1.1 specs - section 6.13.3.1.2, page 90. Different SBB contexts
should be isolated.
A service reproducing this issue is attached. The output produced by the
service is:
12:15:18,260 INFO [HDScanner] Activated
ServiceID[name=TestService,vendor=Company,version=1.0]
12:15:19,515 INFO [RootSbb] Root SBB active, ra entity name = test_entity_1
12:15:19,531 INFO [ChildSbb] Child RA entity name = test_entity_1
12:15:19,531 ERROR [ChildSbb] Child RA entity expected: test_entity_2, but
received: test_entity_1
What version of the product are you using? On what operating system?
Linux, Windows, Mobicents 2.7.0 FINAL
Attachments:
TestService.zip 7.5 KB