3 new revisions:

Revision: c7680bd7b100
Author:   Jean Deruelle <[email protected]>
Date:     Fri Jan 11 08:58:21 2013
Log:      Update Issue 40...
http://code.google.com/p/jain-sip/source/detail?r=c7680bd7b100&repo=ha

Revision: ac00695c405e
Author:   Jean Deruelle <[email protected]>
Date:     Fri Jan 11 09:38:53 2013
Log:      moving to latest snapshot of the LB
http://code.google.com/p/jain-sip/source/detail?r=ac00695c405e&repo=ha

Revision: c500cffcc0dc
Author:   Jean Deruelle <[email protected]>
Date:     Fri Jan 11 09:39:00 2013
Log:      Update Issue 40...
http://code.google.com/p/jain-sip/source/detail?r=c500cffcc0dc&repo=ha

==============================================================================
Revision: c7680bd7b100
Author:   Jean Deruelle <[email protected]>
Date:     Fri Jan 11 08:58:21 2013
Log:      Update Issue 40

Allow load balancing only stack implementation
removing jboss4 module from pom as well

http://code.google.com/p/jain-sip/source/detail?r=c7680bd7b100&repo=ha

Added:
/core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/SipStackImpl.java /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/SipStackImplMBean.java /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/address/AddressFactoryImpl.java /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/header/HeaderFactoryImpl.java /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/message/MessageFactoryImpl.java
Modified:
 /core/src/main/java/org/mobicents/ha/javax/sip/cache/SipCache.java
 /pom.xml

=======================================
--- /dev/null
+++ /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/SipStackImpl.java Fri Jan 11 08:58:21 2013
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.mobicents.ha.balancing.only.javax.sip;
+
+import gov.nist.core.CommonLogger;
+import gov.nist.core.StackLogger;
+import gov.nist.javax.sip.stack.MessageProcessor;
+
+import java.util.Properties;
+
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+import javax.sip.PeerUnavailableException;
+import javax.sip.ProviderDoesNotExistException;
+import javax.sip.SipException;
+
+import org.mobicents.ha.javax.sip.ClusteredSipStack;
+import org.mobicents.ha.javax.sip.ClusteredSipStackImpl;
+import org.mobicents.ha.javax.sip.HASipDialog;
+import org.mobicents.ha.javax.sip.cache.NoCache;
+import org.mobicents.ha.javax.sip.cache.SipCache;
+
+/**
+ * This class extends the ClusteredSipStack to provide an implementation backed by JBoss Cache 3.X
+ *
+ * @author [email protected]
+ *
+ */
+public class SipStackImpl extends ClusteredSipStackImpl implements SipStackImplMBean, NotificationListener { + private static StackLogger logger = CommonLogger.getLogger(SipStackImpl.class); + public static String LOG4J_SERVICE_MBEAN_NAME = "jboss.system:service=Logging,type=Log4jService";
+
+ public SipStackImpl(Properties configurationProperties) throws PeerUnavailableException {
+               super(updateConfigProperties(configurationProperties));
+       }
+
+       @Override
+       public void start() throws ProviderDoesNotExistException, SipException {
+               super.start();
+               try {
+                       if(logger.isLoggingEnabled(StackLogger.TRACE_DEBUG)) {
+ logger.logDebug("Adding notification listener for logging mbean \"" + LOG4J_SERVICE_MBEAN_NAME + "\" to server " + getMBeanServer());
+                       }
+ getMBeanServer().addNotificationListener(new ObjectName(LOG4J_SERVICE_MBEAN_NAME), this, null, null);
+               } catch (Exception e) {
+ logger.logWarning("Could not register the stack as a Notification Listener of " + LOG4J_SERVICE_MBEAN_NAME + " runtime changes to log4j.xml won't affect SIP Stack Logging");
+               }
+       }
+
+ private static final Properties updateConfigProperties(Properties configurationProperties) { + if(configurationProperties.getProperty(ClusteredSipStack.CACHE_CLASS_NAME_PROPERTY) == null) { + configurationProperties.setProperty(ClusteredSipStack.CACHE_CLASS_NAME_PROPERTY, NoCache.class.getName());
+               }
+               return configurationProperties;
+       }
+
+       public int getNumberOfClientTransactions() {
+               return getClientTransactionTableSize();
+       }
+
+       public int getNumberOfDialogs() {
+               return dialogTable.size();
+       }
+
+       public int getNumberOfEarlyDialogs() {
+               return earlyDialogTable.size();
+       }
+
+       public int getNumberOfServerTransactions() {
+               return getServerTransactionTableSize();
+       }
+
+       public boolean isLocalMode() {
+               return getSipCache().inLocalMode();
+       }
+
+       /*
+        * (non-Javadoc)
+ * @see org.mobicents.ha.javax.sip.ClusteredSipStack#passivateDialog(org.mobicents.ha.javax.sip.HASipDialog)
+        */
+       public void passivateDialog(HASipDialog dialog) {
+               // not supported on load balancing mode only
+       }
+
+       public MessageProcessor[] getStackMessageProcessors() {
+               return getMessageProcessors();
+       }
+}
=======================================
--- /dev/null
+++ /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/SipStackImplMBean.java Fri Jan 11 08:58:21 2013
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.mobicents.ha.balancing.only.javax.sip;
+
+/**
+ * @author [email protected]
+ *
+ */
+public interface SipStackImplMBean {
+       public int getNumberOfClientTransactions();
+       public int getNumberOfServerTransactions();
+       public int getNumberOfDialogs();
+       public boolean isLocalMode();
+}
=======================================
--- /dev/null
+++ /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/address/AddressFactoryImpl.java Fri Jan 11 08:58:21 2013
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.mobicents.ha.balancing.only.javax.sip.address;
+
+/**
+ * Just delegates to the NIST SIP Stack Address Factory, SipFactory will instantiates ours due to the pathname provided when creating the sipfactory
+ *
+ * @author [email protected]
+ *
+ */
+public class AddressFactoryImpl extends
+               gov.nist.javax.sip.address.AddressFactoryImpl {
+
+}
=======================================
--- /dev/null
+++ /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/header/HeaderFactoryImpl.java Fri Jan 11 08:58:21 2013
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.mobicents.ha.balancing.only.javax.sip.header;
+
+/**
+ * Just delegates to the NIST SIP Stack Header Factory, SipFactory will instantiates ours due to the pathname provided when creating the sipfactory
+ *
+ * @author [email protected]
+ *
+ */
+public class HeaderFactoryImpl extends
+               gov.nist.javax.sip.header.HeaderFactoryImpl {
+
+}
=======================================
--- /dev/null
+++ /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/message/MessageFactoryImpl.java Fri Jan 11 08:58:21 2013
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.mobicents.ha.balancing.only.javax.sip.message;
+
+/**
+ *
+ * Just delegates to the NIST SIP Stack Message Factory, SipFactory will instantiates ours due to the pathname provided when creating the sipfactory
+ *
+ * @author [email protected]
+ *
+ */
+public class MessageFactoryImpl extends
+               gov.nist.javax.sip.message.MessageFactoryImpl {
+
+       /**
+        *
+        */
+       public MessageFactoryImpl() {
+               // TODO Auto-generated constructor stub
+       }
+
+}
=======================================
--- /core/src/main/java/org/mobicents/ha/javax/sip/cache/SipCache.java Tue Apr 19 06:45:18 2011 +++ /core/src/main/java/org/mobicents/ha/javax/sip/cache/SipCache.java Fri Jan 11 08:58:21 2013
@@ -22,7 +22,6 @@

 package org.mobicents.ha.javax.sip.cache;

-import gov.nist.javax.sip.stack.MobicentsHASIPClientTransaction;
 import gov.nist.javax.sip.stack.SIPClientTransaction;
 import gov.nist.javax.sip.stack.SIPDialog;
 import gov.nist.javax.sip.stack.SIPServerTransaction;
=======================================
--- /pom.xml    Mon Oct  1 05:44:55 2012
+++ /pom.xml    Fri Jan 11 08:58:21 2013
@@ -70,8 +70,7 @@
        <profiles>
                <profile>
                        <id>maven-release</id>
-                       <modules>
-                               <module>jboss-4</module>
+                       <modules>
                                <module>jboss-5</module>
                        </modules>
                        <build>
@@ -86,12 +85,6 @@
                                        </plugin>
                                </plugins>
                        </build>
-               </profile>
-               <profile>
-                       <id>jboss-4</id>
-                       <modules>
-                               <module>jboss-4</module>
-                       </modules>
                </profile>
                <profile>
                        <id>jboss-5</id>
@@ -104,8 +97,7 @@
                </profile>
                <profile>
                        <id>all</id>
-                       <modules>
-                               <module>jboss-4</module>
+                       <modules>
                                <module>jboss-5</module>
                        </modules>
                </profile>

==============================================================================
Revision: ac00695c405e
Author:   Jean Deruelle <[email protected]>
Date:     Fri Jan 11 09:38:53 2013
Log:      moving to latest snapshot of the LB

http://code.google.com/p/jain-sip/source/detail?r=ac00695c405e&repo=ha

Modified:
 /core/pom.xml

=======================================
--- /core/pom.xml       Mon Oct  1 05:44:55 2012
+++ /core/pom.xml       Fri Jan 11 09:38:53 2013
@@ -23,7 +23,7 @@
                <dependency>
                        <groupId>org.mobicents.tools</groupId>
                        <artifactId>sip-balancer-jar</artifactId>
-                       <version>1.6.0.FINAL</version>
+                       <version>1.7.0-SNAPSHOT</version>
                        <scope>provided</scope>
                </dependency>
        </dependencies>

==============================================================================
Revision: c500cffcc0dc
Author:   Jean Deruelle <[email protected]>
Date:     Fri Jan 11 09:39:00 2013
Log:      Update Issue 40

Enable the LB HeartBeat Algo by default in the load balancing only stack

http://code.google.com/p/jain-sip/source/detail?r=c500cffcc0dc&repo=ha

Modified:
/core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/SipStackImpl.java

=======================================
--- /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/SipStackImpl.java Fri Jan 11 08:58:21 2013 +++ /core/src/main/java/org/mobicents/ha/balancing/only/javax/sip/SipStackImpl.java Fri Jan 11 09:39:00 2013
@@ -37,6 +37,8 @@
 import org.mobicents.ha.javax.sip.ClusteredSipStack;
 import org.mobicents.ha.javax.sip.ClusteredSipStackImpl;
 import org.mobicents.ha.javax.sip.HASipDialog;
+import org.mobicents.ha.javax.sip.LoadBalancerHeartBeatingService;
+import org.mobicents.ha.javax.sip.LoadBalancerHeartBeatingServiceImpl;
 import org.mobicents.ha.javax.sip.cache.NoCache;
 import org.mobicents.ha.javax.sip.cache.SipCache;

@@ -71,6 +73,9 @@
if(configurationProperties.getProperty(ClusteredSipStack.CACHE_CLASS_NAME_PROPERTY) == null) { configurationProperties.setProperty(ClusteredSipStack.CACHE_CLASS_NAME_PROPERTY, NoCache.class.getName());
                }
+ if(configurationProperties.getProperty(LoadBalancerHeartBeatingService.LB_HB_SERVICE_CLASS_NAME) == null) { + configurationProperties.setProperty(LoadBalancerHeartBeatingService.LB_HB_SERVICE_CLASS_NAME, LoadBalancerHeartBeatingServiceImpl.class.getName());
+               }
                return configurationProperties;
        }

Reply via email to