Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-SLEE SubComponent-SLEE-Core SLEE-2.8.0.FINAL

New issue 3265 by [email protected]: SLEE: Smpp RA doesn't work properly with multiple RA entities
http://code.google.com/p/mobicents/issues/detail?id=3265

Version tested: slee 2.7.0-FINAL, smpp 2.6.0-FINAL

Bug Description: Smpp RA with multiple ra-entities works only for first entity on list (returned by getResourceAdaptorEntitiesPerType). In other case UnrecognizedActivityException exception is thrown when sbb try to get ACI (using getActivityContextInterface).

javax.slee.UnrecognizedActivityException
at org.mobicents.slee.resource.AbstractActivityContextInterfaceFactory.getACI(AbstractActivityContextInterfaceFactory.java:108) at net.java.slee.resources.smpp.SmppTransactionACIFactoryImpl.getActivityContextInterface(SmppTransactionACIFactoryImpl.java) at com.jtendo.slee.app.services.sms.SMPPHandlerSbb.sendSmppMessage(SMPPHandlerSbb.java:291)
.........

I think that problem is in getActivityHadle of SmmpResourceAdaptor. This method return valid handle even for activity from different ra-entity.

With above modification smpp RA works ok with multiple SMSC instances :

--- ra/src/main/java/org/mobicents/slee/resources/smpp/SmppResourceAdaptor.java (revision 21823) +++ ra/src/main/java/org/mobicents/slee/resources/smpp/SmppResourceAdaptor.java (working copy)

@@ -315,7 +316,12 @@
        }

        public ActivityHandle getActivityHandle(Object obj) {
-               return ((SmppTransactionImpl) obj).getHandle();
+
+               if(((SmppTransactionImpl) obj).getRa() == this){
+                       return ((SmppTransactionImpl) obj).getHandle();
+               } else {
+                       return null;
+               }
        }

        public Marshaler getMarshaler() {

--- ra/src/main/java/org/mobicents/slee/resources/smpp/SmppTransactionImpl.java (revision 21823) +++ ra/src/main/java/org/mobicents/slee/resources/smpp/SmppTransactionImpl.java (working copy)
@@ -178,6 +178,10 @@
                this.smppRA.fireEvent(Utils.SMPP_TIMEOUT_RESPONSE_RECEIVED, 
this, error);
                this.smppRA.endActivity(this);
        }
+
+       public SmppResourceAdaptor getRa(){
+               return smppRA;
+       }
        
        @Override
        public int hashCode() {


Best Regards,
tomek


--



Reply via email to