src/main/java/js/servlet/SessionScopeFactory.java
@Override
	public Object getInstance(InstanceKey instanceKey) {
		// at this point managed instance key is guaranteed to be non null

		// SESSION instances are stored on current HTTP session as named attribute value, using provided instance key
		// HTTP session is created on the fly if necessary
		// if HTTP session exists and possesses an attribute with instance key, simply returns stored instance
		// when HTTP session expires attribute values are removed and SESSION instances are garbage collected

		HttpSession httpSession = getSession(instanceKey);
		return httpSession.getAttribute(instanceKey.getValue());
	}
@Override
	public Object getInstance(InstanceKey instanceKey) {
		// at this point managed instance key is guaranteed to be non null

		// SESSION instances are stored on current HTTP session as named attribute value, using provided instance key
		// HTTP session is created on the fly if necessary
		// if HTTP session exists and possesses an attribute with instance key, simply returns stored instance
		// when HTTP session expires attribute values are removed and SESSION instances are garbage collected

		HttpSession httpSession = getSession(instanceKey);
		return httpSession.getAttribute(instanceKey.getValue());
	}
@ Override public Object getInstance ( InstanceKey instanceKey ) { // at this point managed instance key is guaranteed to be non null
 // SESSION instances are stored on current HTTP session as named attribute value, using provided instance key
 // HTTP session is created on the fly if necessary
 // if HTTP session exists and possesses an attribute with instance key, simply returns stored instance
 // when HTTP session expires attribute values are removed and SESSION instances are garbage collected
 HttpSession httpSession = getSession ( instanceKey ) ; return httpSession . getAttribute ( instanceKey . getValue ( ) ) ; }
Retrieve instance from current HTTP session, bound to given instance key or null if none found. Uses provided instance
key argument as HTTP session attribute name. Managed instance key argument should be not null.
<p>
Access to HTTP session is obtained from HTTP request; therefore, it is considered a bug if attempt to use this method
outside a HTTP request thread.
<p>
Implementation note: this method could have side effect. It <b>creates the HTTP session</b> if there is none on current
HTTP request.

@param instanceKey managed instance key,
@return managed instance or null.
@throws BugError if attempt to use this method outside a HTTP request.
Retrieve instance from current HTTP session bound to given instance key or null if none found . Uses provided instance key argument as HTTP session attribute name . Managed instance key argument should be not null . <p > Access to HTTP session is obtained from HTTP request ; therefore it is considered a bug if attempt to use this method outside a HTTP request thread . <p > Implementation note : this method could have side effect . It <b > creates the HTTP session< / b > if there is none on current HTTP request .