Unbind the given object. We have to locate any attached objects and unbind them first.
@param session
@param validationObject
@param boundMap
976185
public void unbind(ValidationSession session, ValidationObject validationObject,
			Map<ValidationObject, ProxyObject> boundMap) {
		if (validationObject == null) {
			return;
		}
		// For all the fields: look for attached objects.
		ProxyObject proxyObject = session.getProxyObject(validationObject);
		Map<String,ProxyField> fieldMap = proxyObject.getFieldMap();
		for (String fieldName: fieldMap.keySet()) {
			if (fieldName != null) {
				final ClassMetadata classMetadata = m_validationEngine.getClassMetadata(validationObject.getClass());
				final PropertyMetadata fieldMetadata = classMetadata.getField(fieldName);
				if (fieldMetadata == null) {
					continue;
				}
				ProxyField proxyField = proxyObject.getProxyField(fieldName);
				Method getter = proxyField.getGetter();
				if (getter.getReturnType().isAssignableFrom(List.class)) {
					// if this is a list then walk the list and unbind the objects there.
					try {
						@SuppressWarnings("unchecked")
						final List<ValidationObject> validationObjects = 
								(List<ValidationObject>) getter.invoke(validationObject, new Object[] {});
						for (ValidationObject child : validationObjects) {
							m_validationEngine.unbind(session, proxyField, child, boundMap);
							if (child != null) {
								child.setValidationSession(null);
							}
						}
					} catch (Exception e) {
						throw new RuntimeException(e);
					}
					continue;
				}
				if (m_validationEngine.getClassMetadata(getter.getReturnType()) != null) {
					// if this is a known object then unbind it
					try {
						ValidationObject child = (ValidationObject) getter
								.invoke(validationObject, new Object[] {});
						m_validationEngine.unbind(session, proxyField, child, boundMap);
						if (child != null) {
							child.setValidationSession(null);
						}
					} catch (Exception e) {
						throw new RuntimeException(e);
					}
					continue;
				}
			}
		}
	}
1338528
public void onReadyToInvalidate() {

        if (isB2BUAOrphan()) {
            logger.debug("Session is B2BUA Orphaned, lets invalidate");
            setReadyToInvalidate(true);
        }

        if (!readyToInvalidate) {
            logger.debug("Session not ready to invalidate, wait next chance.");
            return;
        }

        boolean allDerivedReady = true;
        Iterator<MobicentsSipSession> derivedSessionsIterator = this.getDerivedSipSessions();
        while (derivedSessionsIterator.hasNext()) {
                MobicentsSipSession mobicentsSipSession = (MobicentsSipSession) derivedSessionsIterator
                                .next();
                boolean derivedIsOrphaned = mobicentsSipSession.isB2BUAOrphan();
                boolean derivedReady = !mobicentsSipSession.isValid() || derivedIsOrphaned;
                allDerivedReady = allDerivedReady & derivedReady;
        }

            if(logger.isDebugEnabled()) {
                String msg = String.format("Session [%s] onReadyToInvalidate, hasParent [%s], hasDerivedSessions [%s], will invalidate [%s]", key, parentSession != null, derivedSipSessions != null, allDerivedReady);
                logger.debug(msg);
            }

        if (!allDerivedReady) {
            logger.debug("Cant invalidate yet, lets wait until all derived to be ready.");
            return;
        } else {
            logger.debug("All Derived ready, lets proceed.");
            }

    	if(logger.isDebugEnabled()) {
    		logger.debug("invalidateWhenReady flag is set to " + invalidateWhenReady);
    	}

    	if(isValid() && this.invalidateWhenReady) {
    		this.notifySipSessionListeners(SipSessionEventType.READYTOINVALIDATE);
    		//If the application does not explicitly invalidate the session in the callback or has not defined a listener,
        	//the container will invalidate the session.
        	if(isValid()) {
        		invalidate(true);
        	}
    	}
    }
799352
private void release() {
        try {
            Method release = BoundObjectTable.Table.class.getDeclaredMethod("release", String.class);
            release.setAccessible(true);
            release.invoke(boundObjectTable, boundId);
        } catch (Exception x) {
            LOG.log(Level.WARNING, "failed to unbind " + boundId, x);
        }
    }
1300113
@Override
    public void removeAttribute(String name) {
        final boolean bTrace = TraceComponent.isAnyTracingEnabled();
        if (bTrace && tc.isDebugEnabled()) {
            Tr.debug(tc, "removeAttribute: " + name);
        }
        if (isInvalid()) {
            throw new IllegalStateException("Session is invalid");
        }
        Object attr = this.attributes.remove(name);
        if (null == attr) {
            if (bTrace && tc.isDebugEnabled()) {
                Tr.debug(tc, "Attribute not found");
            }
            return;
        }
        HttpSessionBindingEvent event = null;
        if (attr instanceof HttpSessionBindingListener) {
            // this value wants to know when it's removed
            if (bTrace && tc.isDebugEnabled()) {
                Tr.debug(tc, "Notifying value; " + attr);
            }
            event = new HttpSessionBindingEvent(this, name, attr);
            ((HttpSessionBindingListener) attr).valueUnbound(event);
        }
        // List<HttpSessionAttributeListener> listeners = this.myConfig.getSessionAttributeListeners();
        // if (null != listeners) {
        // // notify any session-attribute listeners that were registered
        // // in the module configuration
        // if (null == event) {
        // event = new HttpSessionBindingEvent(this, name, attr);
        // }
        // for (HttpSessionAttributeListener listener : listeners) {
        // if (bTrace && tc.isDebugEnabled()) {
        // Tr.debug(tc, "Notifying listener: " + listener);
        // }
        // listener.attributeRemoved(event);
        // }
        // }
    }
368227
public void clean(final ValidationObject object)
    {
        if (m_enabled)
        {
            m_validationEngine.clean(object);
            for (ProxyField proxyField:m_history) {
            	proxyField.expire();
            }
        }
    }
1304867
private void unbind(IActionTarget target) {
        if (targets.remove(target) && targets.isEmpty()) {
            getEventManager().unsubscribe(eventName, this);
        }
    }
528168
public static void removeInputMap(Node node, InputMap<?> im) {
        // getInputMap calls init, so can use unsafe setter
        setInputMapUnsafe(node, getInputMap(node).without(im));
    }
343949
public boolean removeSessionObject(BaseSession sessionObject)
    {
        if (m_vSessionObjectList == null)
            return false;
        boolean bFlag = m_vSessionObjectList.removeElement(sessionObject);
        return bFlag;
    }
381020
public void releaseClientObject (Name username)
    {
        ClientObject clobj = _objmap.get(username);
        if (clobj == null) {
            log.info("Requested to release unmapped client object", "username", username);
            return;
        }

        // decrement the reference count and stop here if there are remaining references
        if (clobj.release()) {
            return;
        }

        log.debug("Destroying client " + clobj.who() + ".");

        // we're all clear to go; remove the mapping
        _objmap.remove(username);

        // and destroy the object itself
        _omgr.destroyObject(clobj.getOid());
    }
841254
public void sessionAttributeRemoved(ISession session, Object name, Object value, Boolean oldIsBindingListener) {
        HttpSessionAttributeListener listener = null;
        HttpSessionBindingEvent event = null;
        HttpSession httpsession = (HttpSession) _adapter.adapt(session);

        event = new HttpSessionBindingEvent(httpsession, (String) name, value);
        // if (value instanceof HttpSessionBindingListener) {
        if (value != null && oldIsBindingListener.booleanValue()) {
            ((HttpSessionBindingListener) value).valueUnbound(event);
        }
        for (int i = 0; i < _sessionAttributeListeners.size(); i++) {
            listener = (HttpSessionAttributeListener) _sessionAttributeListeners.get(i);
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "sessionAttributeRemoved", "SessionManager calling attributeRemoved on listener:" + listener);
            }
            listener.attributeRemoved(event);
        }

    }
1023379
public void unbind() throws Throwable
   {
      if (name == null)
         throw new IllegalArgumentException("Name is null");

      if (trace)
         log.trace("Unbinding " + name);

      Context context = null;
      try
      {
         Properties properties = new Properties();
         properties.setProperty(Context.PROVIDER_URL, jndiProtocol + "://" + jndiHost + ":" + jndiPort);
         context = new InitialContext(properties);


         Util.unbind(context, name);

         objs.remove(name);

         if (log.isDebugEnabled())
            log.debug("Unbound " + name);
      }
      catch (Throwable t)
      {
         log.exceptionDuringUnbind(t);
      }
      finally
      {
         if (context != null)
         {
            try
            {
               context.close();
            }
            catch (NamingException ne)
            {
               // Ignore
            }
         }
      }
   }
666704
private void free(IoSession session) {
        IoBuffer buf = buffersMap.remove(session);
        if (buf != null) {
            buf.free();
        }
    }
1306801
public void remove(final Binding b) {
        if (!disposedInd) {
            boolean unsubscribe = false;
            if (bindings == null) {
                return;
            }
            unsubscribe = bindings.remove(b);
            if (unsubscribe) {
                // if we removed successfully we then need to call dispose on it
                b.dispose();
            }
        }
    }
71027
@Override
    public Object remove(String name) {
        final HttpSession session = this.getPortalSesion(false);
        if (session == null) {
            return null;
        }

        final Object sessionMutex = WebUtils.getSessionMutex(session);
        synchronized (sessionMutex) {
            final Object attribute = session.getAttribute(name);
            if (attribute != null) {
                session.removeAttribute(name);
            }

            return attribute;
        }
    }
969243
public void valueUnbound( HttpSessionBindingEvent event )
    {
        if ( _log.isDebugEnabled() )
        {
            _log.debug( "The page flow stack is being unbound from the session." );
        }
        
        while ( ! isEmpty() )
        {
            PageFlowController jpf = pop( null ).getPageFlow();
            
            // Note that this page flow may have been serialized/deserialized, which will cause its transient info
            // to be lost.  Rehydrate it.
            HttpSession session = event.getSession();
            if ( session != null ) jpf.reinitialize( null, null, session.getServletContext() );
            
            if ( ! jpf.isLongLived() ) jpf.destroy( event.getSession() );
        }
    }
226827
public void valueUnbound( HttpSessionBindingEvent event )
    {
        //
        // We may have lost our transient ServletContext reference.  Try to get the ServletContext reference from the
        // HttpSession object if necessary.
        //
        ServletContext servletContext = getServletContext();
        HttpSession session = event.getSession();

        if ( servletContext == null && session != null )
        {
            servletContext = session.getServletContext();
        }

        if ( servletContext != null )
        {
            if ( !_isDestroyed && Handlers.get( servletContext ).getStorageHandler().allowBindingEvent( event ) )
            {
                destroy( session );
                _isDestroyed = true;
            }
        }
    }
1108819
public void sessionAttributeSet(ISession session, Object name, Object oldValue, Boolean oldIsListener, Object newValue, Boolean newIsListener) {

        HttpSession httpsession = (HttpSession) _adapter.adapt(session);
        HttpSessionBindingEvent addEvent = null; // only init if necessary
        HttpSessionBindingEvent replaceEvent = null; // only init this if
                                                     // necessary..done below

        // do binding listeners first to be consistent with v6.1
        if ((oldValue != null) && (oldIsListener.booleanValue())) {
            replaceEvent = new HttpSessionBindingEvent(httpsession, (String) name, oldValue);
            // if (oldValue instanceof HttpSessionBindingListener)
            ((HttpSessionBindingListener) oldValue).valueUnbound(replaceEvent);
        }
        if ((newValue != null) && (newIsListener.booleanValue())) { // (newValue instanceof HttpSessionBindingListener) ) {
            addEvent = new HttpSessionBindingEvent(httpsession, (String) name, newValue);
            ((HttpSessionBindingListener) newValue).valueBound(addEvent);
        }
    }