8 new revisions:

Revision: 8cff2fa81f4c
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 16:13:14 2012
Log:      Fixes issue 2600...
http://code.google.com/p/jain-slee/source/detail?r=8cff2fa81f4c

Revision: 0644ae7a0797
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 16:27:16 2012
Log:      Fixes issue 3216...
http://code.google.com/p/jain-slee/source/detail?r=0644ae7a0797

Revision: 9ee34850a0c0
Author:   brainslog <brainslog@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 17:07:45 2012
Log:      Updating POMs for next iteration...
http://code.google.com/p/jain-slee/source/detail?r=9ee34850a0c0

Revision: 0c2b895be014
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 18:27:44 2012
Log:      Fixes issue 3219...
http://code.google.com/p/jain-slee/source/detail?r=0c2b895be014

Revision: 5a51ef0ce90a
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 18:56:07 2012
Log:      ...
http://code.google.com/p/jain-slee/source/detail?r=5a51ef0ce90a

Revision: ff017fbbd170
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 18:58:19 2012
Log:      ...
http://code.google.com/p/jain-slee/source/detail?r=ff017fbbd170

Revision: 1336bc92e511
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 19:03:47 2012
Log:      ...
http://code.google.com/p/jain-slee/source/detail?r=1336bc92e511

Revision: a3a859475b0d
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 23:14:17 2012
Log:      ...
http://code.google.com/p/jain-slee/source/detail?r=a3a859475b0d

==============================================================================
Revision: 8cff2fa81f4c
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 16:13:14 2012
Log:      Fixes issue 2600

git-svn-id: https://mobicents.googlecode.com/svn/trunk/servers/jain-slee@22615 bf0df8d0-2c1f-0410-b170-bd30377b63dc

http://code.google.com/p/jain-slee/source/detail?r=8cff2fa81f4c

Added:
/core/components/components/src/test/java/org/mobicents/slee/container/component/deployment/classloading/URLClassLoaderDomainImplCircularDependenciesTest.java
Modified:
/core/components/components/src/main/java/org/mobicents/slee/container/component/AbstractSleeComponent.java /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/DeployableUnitBuilderImpl.java /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ClassLoaderFactoryImpl.java /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ComponentClassLoaderImpl.java /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ReplicationClassLoaderImpl.java /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/URLClassLoaderDomainImpl.java /core/services/src/main/java/org/mobicents/slee/runtime/sbb/SbbObjectPoolManagementImpl.java /core/spi/src/main/java/org/mobicents/slee/container/component/classloading/ComponentClassLoader.java

=======================================
--- /dev/null
+++ /core/components/components/src/test/java/org/mobicents/slee/container/component/deployment/classloading/URLClassLoaderDomainImplCircularDependenciesTest.java Mon Jun 4 16:13:14 2012
@@ -0,0 +1,62 @@
+/*
+ * 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.slee.container.component.deployment.classloading;
+
+import java.net.URL;
+
+import junit.framework.Assert;
+
+import org.mobicents.slee.container.component.deployment.jaxb.descriptors.TCUtilityClass;
+
+/**
+ *
+ * @author martins
+ *
+ */
+public class URLClassLoaderDomainImplCircularDependenciesTest extends TCUtilityClass {
+
+       public void testCircularDependencies() throws Exception {
+               final URL[] urls = {};
+ URLClassLoaderDomainImpl d1 = new URLClassLoaderDomainImpl(urls, Thread.currentThread().getContextClassLoader()); + URLClassLoaderDomainImpl d2 = new URLClassLoaderDomainImpl(urls, Thread.currentThread().getContextClassLoader()); + URLClassLoaderDomainImpl d3 = new URLClassLoaderDomainImpl(urls, Thread.currentThread().getContextClassLoader()); + URLClassLoaderDomainImpl d4 = new URLClassLoaderDomainImpl(urls, Thread.currentThread().getContextClassLoader()); + URLClassLoaderDomainImpl d5 = new URLClassLoaderDomainImpl(urls, Thread.currentThread().getContextClassLoader()); + URLClassLoaderDomainImpl d6 = new URLClassLoaderDomainImpl(urls, Thread.currentThread().getContextClassLoader());
+               d1.addDirectDependency(d2);
+               d1.addDirectDependency(d3);
+               d2.addDirectDependency(d3);
+               d3.addDirectDependency(d2);
+               d2.addDirectDependency(d4);
+               d2.addDirectDependency(d5);
+               d2.addDirectDependency(d6);
+               d3.addDirectDependency(d4);
+               d3.addDirectDependency(d5);
+               d3.addDirectDependency(d6);
+               d4.addDirectDependency(d5);
+               d5.addDirectDependency(d6);
+               d6.addDirectDependency(d3);
+               Assert.assertTrue(d1.getAllDependencies().size() == 5);
+       }
+
+}
=======================================
--- /core/components/components/src/main/java/org/mobicents/slee/container/component/AbstractSleeComponent.java Sat May 28 00:32:14 2011 +++ /core/components/components/src/main/java/org/mobicents/slee/container/component/AbstractSleeComponent.java Mon Jun 4 16:13:14 2012
@@ -24,7 +24,6 @@

 import java.io.File;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.Set;
 import java.util.TreeSet;

@@ -103,16 +102,6 @@
                this.classLoader = classLoader;
        }

- private void addDomainLoadersToJavassistPool(Set<URLClassLoaderDomainImpl> visitedDomains, URLClassLoaderDomainImpl domain) {
-               if (visitedDomains.add(domain)) {
-                       classPool.appendClassPath(new LoaderClassPath(domain));
- // add dependency loaders class paths to the component's javassist classpool - for (URLClassLoaderDomainImpl dependencyDomain : domain.getDependencies()) {
-                               addDomainLoadersToJavassistPool(visitedDomains, 
dependencyDomain);
-                       }
-               }
-       }
-
        /*
         * (non-Javadoc)
* @see org.mobicents.slee.core.component.SleeComponent#getClassLoaderDomain()
@@ -142,7 +131,10 @@
                        }
                        classPool = new ClassPool();
                        // add class path for domain and dependencies
- addDomainLoadersToJavassistPool(new HashSet<URLClassLoaderDomainImpl>(),classLoaderDomain);
+                       classPool.appendClassPath(new 
LoaderClassPath(classLoaderDomain));
+ for(ClassLoader domainDependencies : classLoaderDomain.getAllDependencies()) {
+                               classPool.appendClassPath(new 
LoaderClassPath(domainDependencies));
+                       }
                        // add class path also for slee
classPool.appendClassPath(new LoaderClassPath(classLoaderDomain.getParent()));
                }
@@ -309,7 +301,7 @@
                classLoader = null;

                if (classLoaderDomain != null) {
-                       classLoaderDomain.getDependencies().clear();
+                       classLoaderDomain.clear();
                        classLoaderDomain = null;
                }

=======================================
--- /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/DeployableUnitBuilderImpl.java Tue Dec 27 07:22:46 2011 +++ /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/DeployableUnitBuilderImpl.java Mon Jun 4 16:13:14 2012
@@ -333,7 +333,7 @@
                                                                        (SbbID) 
componentID);
                                }
                                if (dependency != null && 
dependency.getClassLoaderDomain() != null) {
- classLoaderDomain.getDependencies().add(dependency.getClassLoaderDomain()); + classLoaderDomain.addDirectDependency(dependency.getClassLoaderDomain());
                                        if (logger.isTraceEnabled()) {
logger.trace(classLoaderDomain+" added "+dependency.getClassLoaderDomain()+ " in dependencies");
                                        }
=======================================
--- /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ClassLoaderFactoryImpl.java Sat Jun 4 23:23:12 2011 +++ /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ClassLoaderFactoryImpl.java Mon Jun 4 16:13:14 2012
@@ -35,11 +35,6 @@
  */
 public class ClassLoaderFactoryImpl implements ClassLoaderFactory {

-       /**
-        * system wide monitor, used to sync class loading, ensure no dead locks
-        */
-       static final Object MONITOR = new Object();
-
        /*
         * (non-Javadoc)
         *
=======================================
--- /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ComponentClassLoaderImpl.java Sat Jun 4 23:23:12 2011 +++ /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ComponentClassLoaderImpl.java Mon Jun 4 16:13:14 2012
@@ -22,10 +22,6 @@

 package org.mobicents.slee.container.component.deployment.classloading;

-import java.io.IOException;
-import java.net.URL;
-import java.util.Enumeration;
-
 import javax.slee.ComponentID;

import org.mobicents.slee.container.component.classloading.ComponentClassLoader;
@@ -42,18 +38,16 @@
  */
 public class ComponentClassLoaderImpl extends ComponentClassLoader {

-
-
        /**
         * the component id, used to make this class loader unique
         */
        private final ComponentID componentID;
-
+
        /**
- * the class loader pointing to component jar url related with the component
+        * the parent class loader domain
         */
-       private final URLClassLoaderDomainImpl domain;
-
+       private URLClassLoaderDomainImpl parent;
+
        /**
         *
         * @param componentID
@@ -61,17 +55,10 @@
         */
        public ComponentClassLoaderImpl(ComponentID componentID,
                        URLClassLoaderDomainImpl parent) {
-               super();
-               this.domain = parent;
+               super(parent);
+               this.parent = parent;
                this.componentID = componentID;
        }
-
-       @Override
-       protected Class<?> findClass(String name) throws ClassNotFoundException 
{
-               synchronized (ClassLoaderFactoryImpl.MONITOR) {
-                       return domain.loadClass(name);
-               }
-       }

        /**
         * Loads a class locally, i.e., from the component domain managed URLs.
@@ -81,21 +68,9 @@
         * @throws ClassNotFoundException
         */
public Class<?> loadClassLocally(String name) throws ClassNotFoundException {
-               synchronized (ClassLoaderFactoryImpl.MONITOR) {
-                       return domain.findClassLocally(name);
-               }
-       }
-
-       @Override
-       protected URL findResource(String name) {
-               return domain.getResource(name);
-       }
-
-       @Override
-       protected Enumeration<URL> findResources(String name) throws 
IOException {
-               return domain.getResources(name);
-       }
-
+               return parent.findClassLocally(name);
+       }
+
        @Override
        public String toString() {
                return "ComponentClassLoader[ componentID = " + componentID + " 
]";
=======================================
--- /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ReplicationClassLoaderImpl.java Sat Jun 4 23:23:12 2011 +++ /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/ReplicationClassLoaderImpl.java Mon Jun 4 16:13:14 2012
@@ -24,6 +24,9 @@

 import java.io.IOException;
 import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import java.util.Enumeration;
 import java.util.Set;
 import java.util.Vector;
@@ -51,6 +54,27 @@
                super(sleeClassLoader);
        }

+       @Override
+       protected Class<?> loadClass(final String name, final boolean resolve)
+                       throws ClassNotFoundException {
+               if (System.getSecurityManager() != null) {
+                       try {
+                               return AccessController
+                                               .doPrivileged(new 
PrivilegedExceptionAction<Class<?>>() {
+                                                       public Class<?> run()
+                                                                       throws 
ClassNotFoundException {
+                                                               return 
ReplicationClassLoaderImpl.super
+                                                                               
.loadClass(name, resolve);
+                                                       }
+                                               });
+                       } catch (PrivilegedActionException e) {
+                               throw (ClassNotFoundException) e.getException();
+                       }
+               } else {
+                       return super.loadClass(name, resolve);
+               }
+       }
+
        /*
         * (non-Javadoc)
         *
@@ -76,14 +100,27 @@
        }

        @Override
-       protected Class<?> findClass(String name) throws ClassNotFoundException 
{
-               synchronized (ClassLoaderFactoryImpl.MONITOR) {
-                       for (URLClassLoaderDomainImpl domain : domains) {
-                               try {
-                                       return domain.loadClass(name);
-                               } catch (Throwable e) {
-                                       // ignore
-                               }
+ protected Class<?> findClass(final String name) throws ClassNotFoundException {
+               for (final URLClassLoaderDomainImpl domain : domains) {
+                       try {
+                               if (System.getSecurityManager() != null) {
+                                       try {
+                                               return AccessController
+                                                               .doPrivileged(new 
PrivilegedExceptionAction<Class<?>>() {
+                                                                       public 
Class<?> run()
+                                                                               
        throws ClassNotFoundException {
+                                                                               
return domain
+                                                                               
                .loadClass(name, false);
+                                                                       }
+                                                               });
+                                       } catch (PrivilegedActionException e) {
+                                               throw (ClassNotFoundException) 
e.getException();
+                                       }
+                               } else {
+                                       return domain.loadClass(name, false);
+                               }
+                       } catch (Throwable e) {
+                               // ignore
                        }
                }
                throw new ClassNotFoundException(name);
@@ -116,11 +153,6 @@
                                vector.add(enumeration.nextElement());
                        }
                }
-               // now the local ones
-               enumeration = super.findResources(name);
-               while (enumeration.hasMoreElements()) {
-                       vector.add(enumeration.nextElement());
-               }
                return vector.elements();
        }

=======================================
--- /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/URLClassLoaderDomainImpl.java Sat May 28 00:32:14 2011 +++ /core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/classloading/URLClassLoaderDomainImpl.java Mon Jun 4 16:13:14 2012
@@ -28,14 +28,16 @@
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Enumeration;
-import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Map;
+import java.util.List;
 import java.util.Set;
 import java.util.Vector;
-
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.apache.log4j.Logger;
import org.mobicents.slee.container.component.classloading.URLClassLoaderDomain;

 /**
@@ -46,10 +48,13 @@
  */
 public class URLClassLoaderDomainImpl extends URLClassLoaderDomain {

+       private static final Logger logger = Logger
+                       .getLogger(URLClassLoaderDomainImpl.class);
+
        /**
         * the set of dependencies for the domain
         */
- private Set<URLClassLoaderDomainImpl> dependencies = new HashSet<URLClassLoaderDomainImpl>(); + private Set<URLClassLoaderDomainImpl> directDependencies = new HashSet<URLClassLoaderDomainImpl>();

        /**
         *
@@ -61,81 +66,122 @@
        }

        /**
-        * Retrieves the non thread safe set of dependencies for the domain.
+        * Adds a direct dependency to this domain. Direct dependencies are 
other
+        * domains which the domain depends on.
+        *
+        * @param domain
+        */
+       public void addDirectDependency(URLClassLoaderDomainImpl domain) {
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " adding domain " + domain
+                                       + " to direct dependencies");
+               directDependencies.add(domain);
+       }
+
+       /**
+        * Retrieves the set of direct dependencies for the domain.
         *
         * @return
         */
-       public Set<URLClassLoaderDomainImpl> getDependencies() {
-               return dependencies;
+       public Set<URLClassLoaderDomainImpl> getDirectDependencies() {
+               return directDependencies;
        }

-       @Override
-       protected Class<?> loadClass(final String name, final boolean resolve)
-                       throws ClassNotFoundException {
- // use thread locals to check if this domain was already used in this loading process - Map<String, Set<URLClassLoaderDomainImpl>> visitedDomainsMap = URLClassLoaderDomainThreadLocals
-                               .getClassLoadingVisitedDomainsMap();
-               if (visitedDomainsMap == null) {
- visitedDomainsMap = new HashMap<String, Set<URLClassLoaderDomainImpl>>();
-               }
-               Set<URLClassLoaderDomainImpl> visitedDomains = visitedDomainsMap
-                               .get(name);
-               if (visitedDomains == null) {
-                       visitedDomains = new 
HashSet<URLClassLoaderDomainImpl>();
-                       visitedDomainsMap.put(name, visitedDomains);
-               }
-               if (!visitedDomains.add(this)) {
-                       throw new ClassNotFoundException(name);
-               }
-               // not visited yet, proceed with loading
-               URLClassLoaderDomainThreadLocals
-                               
.setClassLoadingVisitedDomainsMap(visitedDomainsMap);
-               try {
-                       if (System.getSecurityManager() != null) {
-                               try {
-                                       return AccessController
-                                                       .doPrivileged(new 
PrivilegedExceptionAction<Class<?>>() {
-                                                               public Class<?> 
run()
-                                                                               
throws ClassNotFoundException {
-                                                                       return 
URLClassLoaderDomainImpl.super
-                                                                               
        .loadClass(name, resolve);
-                                                               }
-                                                       });
-                               } catch (PrivilegedActionException e) {
-                                       throw (ClassNotFoundException) 
e.getException();
-                               }
-                       } else {
-                               return super.loadClass(name, resolve);
-                       }
-               } finally {
-                       // cleanup thread local state previously set
-                       visitedDomainsMap = URLClassLoaderDomainThreadLocals
-                                       .getClassLoadingVisitedDomainsMap();
-                       visitedDomains = visitedDomainsMap.get(name);
-                       visitedDomains.remove(this);
-                       if (visitedDomains.isEmpty()) {
-                               visitedDomainsMap.remove(name);
-                       }
-                       if (visitedDomainsMap.isEmpty()) {
-                               visitedDomainsMap = null;
-                       }
-                       URLClassLoaderDomainThreadLocals
-                                       
.setClassLoadingVisitedDomainsMap(visitedDomainsMap);
+       /**
+ * Retrieves a flat list containing all dependencies for the domain, i.e., all direct dependencies and their own dependencies.
+        * @return
+        */
+       public List<URLClassLoaderDomainImpl> getAllDependencies() {
+ List<URLClassLoaderDomainImpl> result = new ArrayList<URLClassLoaderDomainImpl>();
+               this.getAllDependencies(result);
+               return result;
+       }
+
+       private void getAllDependencies(List<URLClassLoaderDomainImpl> result) {
+               for (URLClassLoaderDomainImpl i : directDependencies) {
+                       if (!result.contains(i)) {
+                               result.add(i);
+                               i.getAllDependencies(result);
+                       }
+               }
+       }
+
+       private static final ReentrantLock GLOBAL_LOCK = new ReentrantLock();
+
+       private boolean acquireGlobalLock() {
+               if (GLOBAL_LOCK.isHeldByCurrentThread()) {
+                       return false;
+               }
+               while (!GLOBAL_LOCK.tryLock()) {
+                       try {
+                               this.wait(10);
+                       } catch (InterruptedException e) {
+                               // ignore
+                       }
+               }
+               return true;
+       }
+
+       private void releaseGlobalLock() {
+               GLOBAL_LOCK.unlock();
+       }
+
+       @Override
+       protected Class<?> loadClass(final String name, final boolean resolve)
+                       throws ClassNotFoundException {
+
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " loadClass: " + name);
+
+               synchronized (this) {
+                       final boolean acquiredLock = acquireGlobalLock();
+                       try {
+                               // load the class
+                               if (System.getSecurityManager() != null) {
+                                       try {
+                                               return AccessController
+                                                               .doPrivileged(new 
PrivilegedExceptionAction<Class<?>>() {
+                                                                       public 
Class<?> run()
+                                                                               
        throws ClassNotFoundException {
+                                                                               
return URLClassLoaderDomainImpl.super
+                                                                               
                .loadClass(name, resolve);
+                                                                       }
+                                                               });
+                                       } catch (PrivilegedActionException e) {
+                                               throw (ClassNotFoundException) 
e.getException();
+                                       }
+                               } else {
+                                       return super.loadClass(name, resolve);
+                               }
+                       } finally {
+                               if (acquiredLock) {
+                                       releaseGlobalLock();
+                               }
+                       }
                }
        }

        @Override
        protected Class<?> findClass(String name) throws ClassNotFoundException 
{
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " findClass: " + name);
                // try 1st in dependencies
-               for (URLClassLoaderDomainImpl dependency : dependencies) {
-                       try {
-                               return dependency.loadClass(name);
-                       } catch (Throwable e) {
-                               // ignore
+               Class<?> c = null;
+               for (URLClassLoaderDomainImpl dependency : 
getAllDependencies()) {
+                       synchronized (dependency) {
+                               c = dependency.findLoadedClass(name);
+                               if (c != null) {
+                                       return c;
+                               }
+                               try {
+                                       return 
dependency.findClassLocallyLocked(name);
+                               } catch (Throwable e) {
+                                       // ignore
+                               }
                        }
                }
                // now locally
-               return findClassLocally(name);
+               return findClassLocallyLocked(name);
        }

        /**
@@ -148,54 +194,36 @@
         */
        protected Class<?> findClassLocally(String name)
                        throws ClassNotFoundException {
-               return super.findClass(name);
-       }
-
-       @Override
-       public URL getResource(String name) {
-               // use thread locals to check if this domain was already visited
- Map<String, Set<URLClassLoaderDomainImpl>> visitedDomainsMap = URLClassLoaderDomainThreadLocals
-                               .getResourceRetrievalVisitedDomainsMap();
-               if (visitedDomainsMap == null) {
- visitedDomainsMap = new HashMap<String, Set<URLClassLoaderDomainImpl>>();
-               }
-               Set<URLClassLoaderDomainImpl> visitedDomains = visitedDomainsMap
-                               .get(name);
-               if (visitedDomains == null) {
-                       visitedDomains = new 
HashSet<URLClassLoaderDomainImpl>();
-                       visitedDomainsMap.put(name, visitedDomains);
-               }
-               if (!visitedDomains.add(this)) {
-                       return null;
-               }
-               // not visited yet, proceed with retrieval
-               URLClassLoaderDomainThreadLocals
-                               
.setResourceRetrievalVisitedDomainsMap(visitedDomainsMap);
-               try {
-                       return super.getResource(name);
-               } finally {
-                       // cleanup thread local state previously set
-                       visitedDomainsMap = URLClassLoaderDomainThreadLocals
-                                       
.getResourceRetrievalVisitedDomainsMap();
-                       visitedDomains = visitedDomainsMap.get(name);
-                       visitedDomains.remove(this);
-                       if (visitedDomains.isEmpty()) {
-                               visitedDomainsMap.remove(name);
-                       }
-                       if (visitedDomainsMap.isEmpty()) {
-                               visitedDomainsMap = null;
-                       }
-                       URLClassLoaderDomainThreadLocals
-                                       
.setResourceRetrievalVisitedDomainsMap(visitedDomainsMap);
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " findClassLocally: " + name);
+               synchronized (this) {
+                       final boolean acquiredLock = acquireGlobalLock();
+                       try {
+                               return findClassLocallyLocked(name);
+                       } finally {
+                               if (acquiredLock) {
+                                       releaseGlobalLock();
+                               }
+                       }
                }
        }
+
+       protected Class<?> findClassLocallyLocked(String name)
+                       throws ClassNotFoundException {
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " findClassLocallyLocked: " + 
name);
+               return super.findClass(name);
+       }

        @Override
        public URL findResource(String name) {
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " findResource: " + name);
+
                // try 1st in dependencies
                URL result = null;
-               for (URLClassLoaderDomainImpl dependency : dependencies) {
-                       result = dependency.getResource(name);
+               for (URLClassLoaderDomainImpl dependency : 
getAllDependencies()) {
+                       result = dependency.findResourceLocally(name);
                        if (result != null) {
                                return result;
                        }
@@ -212,58 +240,22 @@
         * @return
         */
        protected URL findResourceLocally(String name) {
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " findResourceLocally: " + 
name);
+
                return super.findResource(name);
        }
-
- private static final Enumeration<URL> EMPTY_ENUMERATION = new Vector<URL>()
-                       .elements();
-
-       @Override
-       public Enumeration<URL> getResources(String name) throws IOException {
-               // use thread locals to check if this domain was already visited
- Map<String, Set<URLClassLoaderDomainImpl>> visitedDomainsMap = URLClassLoaderDomainThreadLocals
-                               .getResourcesRetrievalVisitedDomainsMap();
-               if (visitedDomainsMap == null) {
- visitedDomainsMap = new HashMap<String, Set<URLClassLoaderDomainImpl>>();
-               }
-               Set<URLClassLoaderDomainImpl> visitedDomains = visitedDomainsMap
-                               .get(name);
-               if (visitedDomains == null) {
-                       visitedDomains = new 
HashSet<URLClassLoaderDomainImpl>();
-                       visitedDomainsMap.put(name, visitedDomains);
-               }
-               if (!visitedDomains.add(this)) {
-                       return EMPTY_ENUMERATION;
-               }
-               // not visited yet, proceed with retrieval
-               URLClassLoaderDomainThreadLocals
-                               
.setResourcesRetrievalVisitedDomainsMap(visitedDomainsMap);
-               try {
-                       return super.getResources(name);
-               } finally {
-                       // cleanup thread local state previously set
-                       visitedDomainsMap = URLClassLoaderDomainThreadLocals
-                                       
.getResourcesRetrievalVisitedDomainsMap();
-                       visitedDomains = visitedDomainsMap.get(name);
-                       visitedDomains.remove(this);
-                       if (visitedDomains.isEmpty()) {
-                               visitedDomainsMap.remove(name);
-                       }
-                       if (visitedDomainsMap.isEmpty()) {
-                               visitedDomainsMap = null;
-                       }
-                       URLClassLoaderDomainThreadLocals
-                                       
.setResourcesRetrievalVisitedDomainsMap(visitedDomainsMap);
-               }
-       }

        @Override
        public Enumeration<URL> findResources(String name) throws IOException {
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " findResources: " + name);
+
                Vector<URL> vector = new Vector<URL>();
                // add resources from dependencies
                Enumeration<URL> enumeration = null;
-               for (URLClassLoaderDomainImpl dependency : dependencies) {
-                       enumeration = dependency.getResources(name);
+               for (URLClassLoaderDomainImpl dependency : 
getAllDependencies()) {
+                       enumeration = dependency.findResourcesLocally(name);
                        while (enumeration.hasMoreElements()) {
                                vector.add(enumeration.nextElement());
                        }
@@ -286,6 +278,9 @@
         */
        protected Enumeration<URL> findResourcesLocally(String name)
                        throws IOException {
+               if (logger.isTraceEnabled())
+                       logger.trace(toString() + " findResourcesLocally: " + 
name);
+
                return super.findResources(name);
        }

@@ -294,5 +289,9 @@
                return "URLClassLoaderDomain( urls= " + Arrays.asList(getURLs())
                                + " )\n";
        }
+
+       public void clear() {
+               directDependencies.clear();
+       }

 }
=======================================
--- /core/services/src/main/java/org/mobicents/slee/runtime/sbb/SbbObjectPoolManagementImpl.java Sat May 28 00:32:14 2011 +++ /core/services/src/main/java/org/mobicents/slee/runtime/sbb/SbbObjectPoolManagementImpl.java Mon Jun 4 16:13:14 2012
@@ -63,7 +63,7 @@
                config.maxIdle = 50;
                config.maxWait = -1;
                config.minEvictableIdleTimeMillis = 60000;
-               config.minIdle = 0;
+               config.minIdle = 1;
                config.numTestsPerEvictionRun = -1;
                config.testOnBorrow = true;
                config.testOnReturn = true;
=======================================
--- /core/spi/src/main/java/org/mobicents/slee/container/component/classloading/ComponentClassLoader.java Sat May 28 00:32:14 2011 +++ /core/spi/src/main/java/org/mobicents/slee/container/component/classloading/ComponentClassLoader.java Mon Jun 4 16:13:14 2012
@@ -33,4 +33,7 @@
  */
 public abstract class ComponentClassLoader extends ClassLoader {

-}
+       public ComponentClassLoader(ClassLoader parent) {
+               super(parent);
+       }
+}

==============================================================================
Revision: 0644ae7a0797
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 16:27:16 2012
Log:      Fixes issue 3216

git-svn-id: https://mobicents.googlecode.com/svn/trunk/servers/jain-slee@22616 bf0df8d0-2c1f-0410-b170-bd30377b63dc

http://code.google.com/p/jain-slee/source/detail?r=0644ae7a0797

Modified:
 /resources/sip11/pom.xml

=======================================
--- /resources/sip11/pom.xml    Tue Jan 31 03:17:17 2012
+++ /resources/sip11/pom.xml    Mon Jun  4 16:27:16 2012
@@ -66,6 +66,11 @@
                                <artifactId>sip-balancer-jar</artifactId>
                                <version>${loadbalancer.version}</version>
                        </dependency>
+                       <dependency>
+                               <groupId>javax.sip</groupId>
+                               <artifactId>jain-sip-ri</artifactId>
+                               <version>1.2.170</version>
+                       </dependency>
                </dependencies>
        </dependencyManagement>


==============================================================================
Revision: 9ee34850a0c0
Author:   brainslog <brainslog@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 17:07:45 2012
Log:      Updating POMs for next iteration

git-svn-id: https://mobicents.googlecode.com/svn/trunk/servers/jain-slee@22618 bf0df8d0-2c1f-0410-b170-bd30377b63dc

http://code.google.com/p/jain-slee/source/detail?r=9ee34850a0c0

Modified:
 /resources/diameter-base/pom.xml
 /resources/diameter-cca/pom.xml
 /resources/diameter-cx-dx/pom.xml
 /resources/diameter-gq/pom.xml
 /resources/diameter-gx/pom.xml
 /resources/diameter-rf/pom.xml
 /resources/diameter-ro/pom.xml
 /resources/diameter-rx/pom.xml
 /resources/diameter-s6a/pom.xml
 /resources/diameter-sh-client/pom.xml
 /resources/diameter-sh-server/pom.xml

=======================================
--- /resources/diameter-base/pom.xml    Fri Jun  1 10:51:42 2012
+++ /resources/diameter-base/pom.xml    Mon Jun  4 17:07:45 2012
@@ -27,8 +27,8 @@

   <properties>
     <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.jdiameter.version>1.5.9.0-build537</mobicents.diameter.jdiameter.version> - <mobicents.diameter.mux.version>1.4.0.FINAL</mobicents.diameter.mux.version> + <mobicents.diameter.jdiameter.version>1.5.9.0-build538-SNAPSHOT</mobicents.diameter.jdiameter.version> + <mobicents.diameter.mux.version>1.4.1-SNAPSHOT</mobicents.diameter.mux.version>
     <mobicents.slee.version>2.6.0.FINAL</mobicents.slee.version>
     <!-- Documentation Related Properties -->
     <docs.profile>mobicents</docs.profile>
=======================================
--- /resources/diameter-cca/pom.xml     Fri Jun  1 11:05:20 2012
+++ /resources/diameter-cca/pom.xml     Mon Jun  4 17:07:45 2012
@@ -24,7 +24,7 @@

        <properties>
                <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.base-common.version>2.7.0.FINAL</mobicents.diameter.resources.base-common.version> + <mobicents.diameter.resources.base-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.base-common.version>
                <!-- Documentation Related Properties -->
                <docs.profile>mobicents</docs.profile>
                <docs.ra.name>Diameter CCA</docs.ra.name>
=======================================
--- /resources/diameter-cx-dx/pom.xml   Fri Jun  1 11:10:40 2012
+++ /resources/diameter-cx-dx/pom.xml   Mon Jun  4 17:07:45 2012
@@ -26,7 +26,7 @@

   <properties>
     <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.base-common.version>2.7.0.FINAL</mobicents.diameter.resources.base-common.version> + <mobicents.diameter.resources.base-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.base-common.version>
     <!-- Documentation Related Properties -->
     <docs.profile>mobicents</docs.profile>
     <docs.ra.name>Diameter Cx/Dx</docs.ra.name>
=======================================
--- /resources/diameter-gq/pom.xml      Fri Jun  1 11:15:22 2012
+++ /resources/diameter-gq/pom.xml      Mon Jun  4 17:07:45 2012
@@ -26,7 +26,7 @@

        <properties>
                <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.base-common.version>2.7.0.FINAL</mobicents.diameter.resources.base-common.version> + <mobicents.diameter.resources.base-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.base-common.version>
                <!-- Documentation Related Properties -->
                <docs.profile>mobicents</docs.profile>
                <docs.ra.name>Diameter Gq</docs.ra.name>
=======================================
--- /resources/diameter-gx/pom.xml      Fri Jun  1 11:20:01 2012
+++ /resources/diameter-gx/pom.xml      Mon Jun  4 17:07:45 2012
@@ -42,7 +42,7 @@

     <properties>
         <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.cca-common.version>2.7.0.FINAL</mobicents.diameter.resources.cca-common.version> + <mobicents.diameter.resources.cca-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.cca-common.version>
         <!-- Documentation Related Properties -->
         <docs.profile>mobicents</docs.profile>
         <docs.ra.name>Diameter Gx</docs.ra.name>
=======================================
--- /resources/diameter-rf/pom.xml      Fri Jun  1 11:24:46 2012
+++ /resources/diameter-rf/pom.xml      Mon Jun  4 17:07:45 2012
@@ -26,7 +26,7 @@

        <properties>
                <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.base-common.version>2.7.0.FINAL</mobicents.diameter.resources.base-common.version> + <mobicents.diameter.resources.base-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.base-common.version>
                <!-- Documentation Related Properties -->
                <docs.profile>mobicents</docs.profile>
                <docs.ra.name>Diameter Rf</docs.ra.name>
=======================================
--- /resources/diameter-ro/pom.xml      Fri Jun  1 11:29:25 2012
+++ /resources/diameter-ro/pom.xml      Mon Jun  4 17:07:45 2012
@@ -26,7 +26,7 @@

   <properties>
     <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.cca-common.version>2.7.0.FINAL</mobicents.diameter.resources.cca-common.version> + <mobicents.diameter.resources.cca-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.cca-common.version>
        <!-- Documentation Related Properties -->
     <docs.profile>mobicents</docs.profile>
     <docs.ra.name>Diameter Ro</docs.ra.name>
=======================================
--- /resources/diameter-rx/pom.xml      Fri Jun  1 11:34:09 2012
+++ /resources/diameter-rx/pom.xml      Mon Jun  4 17:07:45 2012
@@ -35,7 +35,7 @@

     <properties>
         <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.cca-common.version>2.7.0.FINAL</mobicents.diameter.resources.cca-common.version> + <mobicents.diameter.resources.cca-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.cca-common.version>
         <!-- Documentation Related Properties -->
         <docs.profile>mobicents</docs.profile>
         <docs.ra.name>Diameter Rx</docs.ra.name>
=======================================
--- /resources/diameter-s6a/pom.xml     Fri Jun  1 11:48:31 2012
+++ /resources/diameter-s6a/pom.xml     Mon Jun  4 17:07:45 2012
@@ -35,7 +35,7 @@

     <properties>
         <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.base-common.version>2.7.0.FINAL</mobicents.diameter.resources.base-common.version> + <mobicents.diameter.resources.base-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.base-common.version>
         <!-- Documentation Related Properties -->
         <docs.profile>mobicents</docs.profile>
         <docs.ra.name>Diameter S6a</docs.ra.name>
=======================================
--- /resources/diameter-sh-client/pom.xml       Fri Jun  1 11:38:57 2012
+++ /resources/diameter-sh-client/pom.xml       Mon Jun  4 17:07:45 2012
@@ -27,7 +27,7 @@

   <properties>
     <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.base-common.version>2.7.0.FINAL</mobicents.diameter.resources.base-common.version> + <mobicents.diameter.resources.base-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.base-common.version>
        <!-- Documentation Related Properties -->
     <docs.profile>mobicents</docs.profile>
     <docs.ra.name>Diameter Sh-Client</docs.ra.name>
=======================================
--- /resources/diameter-sh-server/pom.xml       Fri Jun  1 11:44:13 2012
+++ /resources/diameter-sh-server/pom.xml       Mon Jun  4 17:07:45 2012
@@ -26,7 +26,7 @@

   <properties>
     <!-- Mobicents Diameter Components Versions -->
- <mobicents.diameter.resources.sh-common.version>2.7.0.FINAL</mobicents.diameter.resources.sh-common.version> + <mobicents.diameter.resources.sh-common.version>2.8.0-SNAPSHOT</mobicents.diameter.resources.sh-common.version>
        <!-- Documentation Related Properties -->
     <docs.profile>mobicents</docs.profile>
     <docs.ra.name>Diameter Sh-Server</docs.ra.name>

==============================================================================
Revision: 0c2b895be014
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 18:27:44 2012
Log:      Fixes issue 3219

git-svn-id: https://mobicents.googlecode.com/svn/trunk/servers/jain-slee@22619 bf0df8d0-2c1f-0410-b170-bd30377b63dc

http://code.google.com/p/jain-slee/source/detail?r=0c2b895be014

Modified:
 /examples/sip-b2bua/pom.xml
/examples/sip-b2bua/sbb/src/main/java/org/mobicents/slee/example/sip11/b2b/SimpleSip11B2BTestSbb.java
 /examples/sip-uas/pom.xml
/examples/sip-uas/sbb/src/main/java/org/mobicents/slee/example/sip/SipUASExampleSbb.java

=======================================
--- /examples/sip-b2bua/pom.xml Fri May 13 14:55:12 2011
+++ /examples/sip-b2bua/pom.xml Mon Jun  4 18:27:44 2012
@@ -6,7 +6,7 @@
        <parent>
                <groupId>org.mobicents</groupId>
                <artifactId>mobicents-parent</artifactId>
-               <version>2.18</version>
+               <version>2.21</version>
        </parent>

        <artifactId>mobicents-slee-example-sip11-b2b</artifactId>
@@ -19,7 +19,7 @@
        </modules>

        <properties>
- <mobicents.resources.sip11.version>2.4.0.FINAL</mobicents.resources.sip11.version> + <mobicents.resources.sip11.version>2.7.0-SNAPSHOT</mobicents.resources.sip11.version>
                <docs.profile>mobicents</docs.profile>
        </properties>

=======================================
--- /examples/sip-b2bua/sbb/src/main/java/org/mobicents/slee/example/sip11/b2b/SimpleSip11B2BTestSbb.java Thu Apr 28 02:54:47 2011 +++ /examples/sip-b2bua/sbb/src/main/java/org/mobicents/slee/example/sip11/b2b/SimpleSip11B2BTestSbb.java Mon Jun 4 18:27:44 2012
@@ -58,6 +58,8 @@
public void onInviteEvent(RequestEvent event, ActivityContextInterface aci) {
                // ACI is the server transaction activity
                try {
+                       // send "trying" response
+                       replyToRequestEvent(event, Response.TRYING);
                        // Create the dialogs representing the incoming and 
outgoing call
                        // legs.
                        final DialogActivity incomingDialog = (DialogActivity) 
sipProvider
=======================================
--- /examples/sip-uas/pom.xml   Fri May 13 14:55:12 2011
+++ /examples/sip-uas/pom.xml   Mon Jun  4 18:27:44 2012
@@ -6,7 +6,7 @@
        <parent>
                <groupId>org.mobicents</groupId>
                <artifactId>mobicents-parent</artifactId>
-               <version>2.18</version>
+               <version>2.21</version>
        </parent>

        <artifactId>mobicents-slee-example-sip-uas</artifactId>
@@ -19,7 +19,7 @@
        </modules>

        <properties>
- <mobicents.resources.sip11.version>2.4.0.FINAL</mobicents.resources.sip11.version> + <mobicents.resources.sip11.version>2.7.0-SNAPSHOT</mobicents.resources.sip11.version>
        </properties>

        <profiles>
=======================================
--- /examples/sip-uas/sbb/src/main/java/org/mobicents/slee/example/sip/SipUASExampleSbb.java Thu Apr 28 02:54:47 2011 +++ /examples/sip-uas/sbb/src/main/java/org/mobicents/slee/example/sip/SipUASExampleSbb.java Mon Jun 4 18:27:44 2012
@@ -40,6 +40,7 @@
 import javax.slee.facilities.TimerFacility;
 import javax.slee.facilities.TimerOptions;
 import javax.slee.facilities.TimerPreserveMissed;
+import javax.slee.facilities.Tracer;
 import javax.slee.resource.ResourceAdaptorTypeID;
 import javax.slee.serviceactivity.ServiceStartedEvent;

@@ -50,8 +51,7 @@
 import org.mobicents.slee.ActivityContextInterfaceExt;
 import org.mobicents.slee.SbbContextExt;

-public abstract class SipUASExampleSbb
-               implements javax.slee.Sbb {
+public abstract class SipUASExampleSbb implements javax.slee.Sbb {

private static final ResourceAdaptorTypeID sipRATypeID = new ResourceAdaptorTypeID(
                        "JAIN SIP", "javax.sip", "1.2");
@@ -66,6 +66,57 @@

        private static ContactHeader contactHeader;
        private static TimerOptions timerOptions;
+       private static Tracer tracer;
+
+       private SbbContextExt sbbContext; // This SBB's SbbContext
+
+       // SbbObject lifecycle methods
+
+       public void setSbbContext(SbbContext context) {
+               sbbContext = (SbbContextExt) context;
+ sipActivityContextInterfaceFactory = (SipActivityContextInterfaceFactory) sbbContext
+                               
.getActivityContextInterfaceFactory(sipRATypeID);
+               sleeSipProvider = (SleeSipProvider) sbbContext
+                               .getResourceAdaptorInterface(sipRATypeID, 
sipRALink);
+               addressFactory = sleeSipProvider.getAddressFactory();
+               headerFactory = sleeSipProvider.getHeaderFactory();
+               messageFactory = sleeSipProvider.getMessageFactory();
+               timerFacility = sbbContext.getTimerFacility();
+       }
+
+       public void unsetSbbContext() {
+               this.sbbContext = null;
+       }
+
+       public void sbbCreate() throws javax.slee.CreateException {
+       }
+
+       public void sbbPostCreate() throws javax.slee.CreateException {
+       }
+
+       public void sbbActivate() {
+       }
+
+       public void sbbPassivate() {
+       }
+
+       public void sbbRemove() {
+       }
+
+       public void sbbLoad() {
+       }
+
+       public void sbbStore() {
+       }
+
+       public void sbbExceptionThrown(Exception exception, Object event,
+                       ActivityContextInterface activity) {
+       }
+
+       public void sbbRolledBack(RolledBackContext context) {
+       }
+
+       // some helper methods to deal with lazy init of static fields

        private ContactHeader getContactHeader() throws ParseException {
                if (contactHeader == null) {
@@ -88,24 +139,49 @@
                }
                return timerOptions;
        }
-
+
+       private Tracer getTracer() {
+               if (tracer == null) {
+                       tracer = 
sbbContext.getTracer(getClass().getSimpleName());
+               }
+               return tracer;
+       }
+
+       // event handlers, the service's logic
+
+       /**
+        * Event handler method for the event signaling the service activation.
+        *
+        * @param event
+        * @param aci
+        */
        public void onServiceStartedEvent(ServiceStartedEvent event,
                        ActivityContextInterface aci) {
-               sbbContext.getTracer(getClass().getSimpleName()).warning(
-                               "Service activated, now execute SIPP script.");
+               getTracer().warning("Service activated, now execute SIPP 
script.");
        }

+       /**
+        * Event handler method for the invite SIP message.
+        *
+        * @param requestEvent
+        * @param aci
+        */
        public void onInviteEvent(javax.sip.RequestEvent requestEvent,
                        ActivityContextInterface aci) {

-               final SbbLocalObject sbbLocalObject = this.sbbContext
-                               .getSbbLocalObject();
-               aci.detach(sbbLocalObject);
-
                final ServerTransaction serverTransaction = requestEvent
                                .getServerTransaction();
                try {
-                       // create dialog and attach this entity to it's aci
+                       // send "trying" response
+                       Response response = 
messageFactory.createResponse(Response.TRYING,
+                                       requestEvent.getRequest());
+                       serverTransaction.sendResponse(response);
+                       // get local object
+                       final SbbLocalObject sbbLocalObject = this.sbbContext
+                                       .getSbbLocalObject();
+                       // detach from the server tx activity
+                       aci.detach(sbbLocalObject);
+                       // create dialog activity and attach to it
                        final DialogActivity dialog = (DialogActivity) 
sleeSipProvider
                                        .getNewDialog(serverTransaction);
final ActivityContextInterfaceExt dialogAci = (ActivityContextInterfaceExt) sipActivityContextInterfaceFactory
@@ -115,76 +191,33 @@
                        timerFacility.setTimer(dialogAci, null,
                                        System.currentTimeMillis() + 60000L, 
getTimerOptions());
                        // send 180
-                       Response response = 
messageFactory.createResponse(Response.RINGING,
+                       response = 
messageFactory.createResponse(Response.RINGING,
                                        requestEvent.getRequest());
-                       response.addHeader(getContactHeader());
                        serverTransaction.sendResponse(response);
                        // send 200 ok
-                       response = messageFactory.createResponse(Response.OK, 
requestEvent
-                                       .getRequest());
+                       response = messageFactory.createResponse(Response.OK,
+                                       requestEvent.getRequest());
                        response.addHeader(getContactHeader());
                        serverTransaction.sendResponse(response);
-               } catch (Exception ex) {
-                       ex.printStackTrace();
+               } catch (Exception e) {
+                       getTracer().severe("failure while processing initial 
invite", e);
                }
        }

+       /**
+        * Event handler method for the timer event.
+        *
+        * @param event
+        * @param aci
+        */
        public void onTimerEvent(TimerEvent event, ActivityContextInterface 
aci) {
-
                aci.detach(sbbContext.getSbbLocalObject());
-
                final DialogActivity dialog = (DialogActivity) 
aci.getActivity();
                try {
                        dialog.sendRequest(dialog.createRequest(Request.BYE));
-               } catch (Exception ex) {
-                       ex.printStackTrace();
+               } catch (Exception e) {
+                       getTracer().severe("failure while processing timer 
event", e);
                }
        }

-       public void setSbbContext(SbbContext context) {
-               sbbContext = (SbbContextExt) context;
- sipActivityContextInterfaceFactory = (SipActivityContextInterfaceFactory) sbbContext
-                               
.getActivityContextInterfaceFactory(sipRATypeID);
-               sleeSipProvider = (SleeSipProvider) sbbContext
-                               .getResourceAdaptorInterface(sipRATypeID, 
sipRALink);
-               addressFactory = sleeSipProvider.getAddressFactory();
-               headerFactory = sleeSipProvider.getHeaderFactory();
-               messageFactory = sleeSipProvider.getMessageFactory();
-               timerFacility = sbbContext.getTimerFacility();
-       }
-
-       public void unsetSbbContext() {
-               this.sbbContext = null;
-       }
-
-       public void sbbCreate() throws javax.slee.CreateException {
-       }
-
-       public void sbbPostCreate() throws javax.slee.CreateException {
-       }
-
-       public void sbbActivate() {
-       }
-
-       public void sbbPassivate() {
-       }
-
-       public void sbbRemove() {
-       }
-
-       public void sbbLoad() {
-       }
-
-       public void sbbStore() {
-       }
-
-       public void sbbExceptionThrown(Exception exception, Object event,
-                       ActivityContextInterface activity) {
-       }
-
-       public void sbbRolledBack(RolledBackContext context) {
-       }
-
-       private SbbContextExt sbbContext; // This SBB's SbbContext
-
-}
+}

==============================================================================
Revision: 5a51ef0ce90a
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 18:56:07 2012
Log:

git-svn-id: https://mobicents.googlecode.com/svn/trunk/servers/jain-slee@22620 bf0df8d0-2c1f-0410-b170-bd30377b63dc

http://code.google.com/p/jain-slee/source/detail?r=5a51ef0ce90a

Modified:
 /examples/sip-jdbc-registrar/pom.xml

=======================================
--- /examples/sip-jdbc-registrar/pom.xml        Tue Jan 31 04:50:17 2012
+++ /examples/sip-jdbc-registrar/pom.xml        Mon Jun  4 18:56:07 2012
@@ -27,7 +27,7 @@
                        <dependency>
                                <groupId>org.mobicents.resources</groupId>
                                <artifactId>sip11-ratype</artifactId>
-                               <version>2.6.0.FINAL</version>
+                               <version>2.7.0-SNAPSHOT</version>
                        </dependency>
                        <dependency>
                                
<artifactId>mobicents-slee-ra-jdbc-ratype</artifactId>

==============================================================================
Revision: ff017fbbd170
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 18:58:19 2012
Log:

git-svn-id: https://mobicents.googlecode.com/svn/trunk/servers/jain-slee@22621 bf0df8d0-2c1f-0410-b170-bd30377b63dc

http://code.google.com/p/jain-slee/source/detail?r=ff017fbbd170

Modified:
 /enablers/rest-client/pom.xml

=======================================
--- /enablers/rest-client/pom.xml       Thu Feb  2 18:22:25 2012
+++ /enablers/rest-client/pom.xml       Mon Jun  4 18:58:19 2012
@@ -21,7 +21,7 @@

        <properties>
<mobicents.resources.http.version>2.5.0.FINAL</mobicents.resources.http.version> - <mobicents.resources.xtension.version>1.0.0.BETA2</mobicents.resources.xtension.version> + <mobicents.resources.xtension.version>1.0.0-SNAPSHOT</mobicents.resources.xtension.version>
        </properties>

        <dependencyManagement>

==============================================================================
Revision: 1336bc92e511
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 19:03:47 2012
Log:

git-svn-id: https://mobicents.googlecode.com/svn/trunk/servers/jain-slee@22622 bf0df8d0-2c1f-0410-b170-bd30377b63dc

http://code.google.com/p/jain-slee/source/detail?r=1336bc92e511

Modified:
 /tools/jopr-plugin/pom.xml

=======================================
--- /tools/jopr-plugin/pom.xml  Thu Feb  2 19:30:33 2012
+++ /tools/jopr-plugin/pom.xml  Mon Jun  4 19:03:47 2012
@@ -40,7 +40,7 @@
                <jbossas.version>5.1.0.GA</jbossas.version>
                <jopr-version>2.2.0.GA</jopr-version>
                <rhq-version>3.0.0.B06</rhq-version>
-               <mobicents.jslee.version>2.6.0.FINAL</mobicents.jslee.version>
+               
<mobicents.jslee.version>2.7.0-SNAPSHOT</mobicents.jslee.version>
                <getopt.version>1.0.13</getopt.version>
        </properties>


==============================================================================
Revision: a3a859475b0d
Author:   emmartins <emmartins@bf0df8d0-2c1f-0410-b170-bd30377b63dc>
Date:     Mon Jun  4 23:14:17 2012
Log:

git-svn-id: https://mobicents.googlecode.com/svn/trunk/servers/jain-slee@22627 bf0df8d0-2c1f-0410-b170-bd30377b63dc

http://code.google.com/p/jain-slee/source/detail?r=a3a859475b0d

Modified:
 /resources/jcc/pom.xml

=======================================
--- /resources/jcc/pom.xml      Tue Feb  7 04:45:56 2012
+++ /resources/jcc/pom.xml      Mon Jun  4 23:14:17 2012
@@ -28,12 +28,12 @@
                <docs.ra.dirname>jcc</docs.ra.dirname>
                <docs.bookid>JCC</docs.bookid>
                <docs.profile>mobicents</docs.profile>
-               <tcap.version>1.0.0.CR3</tcap.version>
-               <sccp.version>1.0.0.CR3</sccp.version>
-               <asn.version>1.0.0.CR2</asn.version>
-               <mtp.version>1.0.0.CR3</mtp.version>
-               <stream.version>1.0.0.CR1</stream.version>
-               <m3ua.version>1.0.0.CR3</m3ua.version>
+               <tcap.version>1.0.0.FINAL</tcap.version>
+               <sccp.version>1.0.0.FINAL</sccp.version>
+               <asn.version>1.0.0.FINAL</asn.version>
+               <mtp.version>1.0.0.FINAL</mtp.version>
+               <stream.version>1.0.0.FINAL</stream.version>
+               <m3ua.version>1.0.0.FINAL</m3ua.version>
                <version.jcc>1.1</version.jcc>
                <version.concurrent>1.3.4</version.concurrent>
<!-- <version.junit>3.8.2</version.junit> <version.log4j>1.2.14</version.log4j>

Reply via email to