Skip to main content

mobicents 1.2.0 BETA 3 and mobicents parlay RA

2 replies [Last post]
scottjg
Offline
Joined: 2008-08-21

Hi,

I installed mobicent Parlay RA under mobicents 1.2.0 BETA 3 server. I changed bin sheel script to use new javax.slee.management.ResourceManagementMBean, I copied missing jars like Jacorb.jar, avalon-framework.jar, logkit.jar to node's library. RA installed correctly and concected to Parlay Gatewey.
I see in JNDI records like that :
| +- resources (class: org.jnp.interfaces.NamingContext)
| | +- parlay (class: org.jnp.interfaces.NamingContext)
| | | +- org.mobicents (class: org.jnp.interfaces.NamingContext)
| | | | +- 4.2 (class: org.jnp.interfaces.NamingContext)
| | | | | +- ParlayRA (class: org.jnp.interfaces.NamingContext)
| | | | | | +- factoryprovider (class:org.mobicents.slee.resource.parlay.ParlayProviderImpl)

I have in my sbb jar file entry :

parlay
org.mobicents
4.2

slee/resources/parlay/4.2/resourceAdapterSbbInterface
ParlayRA

In my sbb I'm trying get reference to ParlayResourceAdapterSbbInterface from InitialContext but the lookup method return null:

private static final String RA_PARLAY_JNDI = "java:comp/env/slee/resources/parlay/4.2/resourceAdapterSbbInterface";
....

Context ctx = ( Context ) new InitialContext();

resourceAdapterSbbInterface = ( ParlayResourceAdapterSbbInterface ) ctx
.lookup( RA_PARLAY_JNDI );

Does anybody know why I get null? I thought that during deploymnet SBB, SLEE registering ParlayRA under given name (from sbb.jar file).
All of this works under stable version 1.0.03.

scottjg

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eduardomartins
Offline
Joined: 2005-10-10

Parlay RA is available at the SVN - http://mobicents.googlecode.com/svn/trunk/servers/jain-slee/resources/pa....

Your sbb must define the RA in it's sbb descriptor, such as:



parlay
org.mobicents
4.2


slee/resources/ParlayRA/parlayacif



slee/resources/parlay/4.2/resourceAdapterSbbInterface


ParlayRA


Then in the SBB code you get the RA's SBB interface, in setSbbContext(...) like:

try {
Context ctx = (Context) new InitialContext()
.lookup("java:comp/env");
// get the reference to the ParlayResourceAdapterSbb class which
// implements ParlayResourceAdapterSbbInterface
resourceAdapterSbbInterface = (ParlayResourceAdapterSbbInterface) ctx
.lookup("slee/resources/parlay/4.2/resourceAdapterSbbInterface");
}
catch (NamingException ne) {
trace(Level.WARNING,
"ERROR: Exception caught processing setSbbContext", ne);
}

scottjg
Offline
Joined: 2008-08-21

Thanks a lot for help.
I had error somewhere else. I set resourceAdapterSbbInterface reference in event handler method (it was remained from my previous work) and not in sbbContext() so when SBB received another event, SLEE assign to SBB Entity antoher/new SBB object so the reference to resourceAdapterSbbInterface was null :)

scottjg

Message was edited by: scottjg