private void addDereferencedIpids ( final String IPID, final byte[] oid ) { logger.info ( "addDereferencedIpids for session : {} , IPID is: {}", getSessionIdentifier (), IPID ); synchronized ( mutex ) { if ( !this.listOfDeferencedIpids.contains ( IPID ) ) { this.listOfDeferencedIpids.add ( IPID ); } } //Will call the JIComOxidRuntime, and that is synched on mutex3, but that will not cause a deadlock, since //it or rather any method of JIComOxidRuntime does not call back into JISession. JIComOxidRuntime.delIPIDReference ( IPID, new JIObjectId ( oid, false ), this ); }
private static void postDestroy(JISession session) throws JIException { //now destroy all linked sessions if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("About to destroy links for Session: " + session.getSessionIdentifier() + " , size of which is " + session.links.size()); } for (int i = 0; i < session.links.size();i++) { JISession.destroySession((JISession)session.links.get(i)); } session.links.clear(); //finally any oids exported by this session. JIComOxidRuntime.destroySessionOIDs(session.getSessionIdentifier()); }
private static void postDestroy(JISession session) throws JIException { //now destroy all linked sessions if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("About to destroy links for Session: " + session.getSessionIdentifier() + " , size of which is " + session.links.size()); } for (int i = 0; i < session.links.size();i++) { JISession.destroySession((JISession)session.links.get(i)); } session.links.clear(); //finally any oids exported by this session. JIComOxidRuntime.destroySessionOIDs(session.getSessionIdentifier()); }
/** * @exclude * @param IPID */ private void addToSession ( final String IPID, final byte[] oid, final boolean dontping ) { //Weak reference of the object //mapOfObjects.put(new WeakReference(IPID,referenceQueueOfCOMObjects),IPID); //it does not matter if we create a new OID here, the OxidCOMRunttime API uses the OID in the MAP , and not this one. final JIObjectId joid = new JIObjectId ( oid, dontping ); JIComOxidRuntime.addUpdateOXIDs ( this, IPID, joid ); logger.info ( "[addToSession] Adding IPID: {} to session: {}", IPID, getSessionIdentifier () ); }
private void addDereferencedIpids(String IPID, byte[] oid) { if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("addDereferencedIpids for session : " + getSessionIdentifier() + " , IPID is: " + IPID); } synchronized (mutex) { if (!listOfDeferencedIpids.contains(IPID)) { listOfDeferencedIpids.add(IPID); } } //Will call the JIComOxidRuntime, and that is synched on mutex3, but that will not cause a deadlock, since //it or rather any method of JIComOxidRuntime does not call back into JISession. JIComOxidRuntime.delIPIDReference(IPID,new JIObjectId(oid),this); }
private void addDereferencedIpids(String IPID, byte[] oid) { if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("addDereferencedIpids for session : " + getSessionIdentifier() + " , IPID is: " + IPID); } synchronized (mutex) { if (!listOfDeferencedIpids.contains(IPID)) { listOfDeferencedIpids.add(IPID); } } //Will call the JIComOxidRuntime, and that is synched on mutex3, but that will not cause a deadlock, since //it or rather any method of JIComOxidRuntime does not call back into JISession. JIComOxidRuntime.delIPIDReference(IPID,new JIObjectId(oid,false),this); }
public String toString() { return "IJIComObject[" + internal_getInterfacePointer() + " , session: " + getAssociatedSession().getSessionIdentifier() + ", isLocal: " + isLocalReference() + "]"; } }
public String toString() { return "IJIComObject[" + internal_getInterfacePointer() + " , session: " + getAssociatedSession().getSessionIdentifier() + ", isLocal: " + isLocalReference() + "]"; } }
@Override public String toString () { return "IJIComObject[" + internal_getInterfacePointer () + " , session: " + getAssociatedSession ().getSessionIdentifier () + ", isLocal: " + isLocalReference () + "]"; } }
/** * @exclude * @param IPID */ private void addToSession(String IPID,byte[] oid) { //Weak reference of the object //mapOfObjects.put(new WeakReference(IPID,referenceQueueOfCOMObjects),IPID); //it does not matter if we create a new OID here, the OxidCOMRunttime API uses the OID in the MAP , and not this one. JIObjectId joid = new JIObjectId(oid); JIComOxidRuntime.addUpdateOXIDs(this,IPID,joid); if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("[addToSession] Adding IPID: " + IPID + " to session: " + getSessionIdentifier()); } }
private JIStruct prepareForReleaseRef ( final String IPID, final int numInstancesfirsttime ) throws JIException { final JIStruct remInterface = new JIStruct (); remInterface.addMember ( new rpc.core.UUID ( IPID ) ); remInterface.addMember ( new Integer ( numInstancesfirsttime + 5 ) ); // numInstancesfirsttime of the original and 5 for the addRef done later on. remInterface.addMember ( new Integer ( 0 ) );//private refs = 0 logger.warn ( "prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: {} session: {} , numInstancesfirsttime is {}", new Object[] { IPID, getSessionIdentifier (), numInstancesfirsttime } ); debug_delIpids ( IPID, numInstancesfirsttime + 5 ); return remInterface; }
/** * @exclude * @param IPID */ private void addToSession(String IPID,byte[] oid, boolean dontping) { //Weak reference of the object //mapOfObjects.put(new WeakReference(IPID,referenceQueueOfCOMObjects),IPID); //it does not matter if we create a new OID here, the OxidCOMRunttime API uses the OID in the MAP , and not this one. JIObjectId joid = new JIObjectId(oid,dontping); JIComOxidRuntime.addUpdateOXIDs(this,IPID,joid); if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("[addToSession] Adding IPID: " + IPID + " to session: " + getSessionIdentifier()); } }
private JIStruct prepareForReleaseRef(String IPID) throws JIException { JIStruct remInterface = new JIStruct(); remInterface.addMember(new rpc.core.UUID(IPID)); remInterface.addMember(new Integer(5 + 5)); // 5 of the original and 5 for the addRef done later on. remInterface.addMember(new Integer(0));//private refs = 0 if (JISystem.getLogger().isLoggable(Level.WARNING)) { JISystem.getLogger().warning("prepareForReleaseRef: Releasing 10 references of IPID: " + IPID + " session: " + getSessionIdentifier()); debug_delIpids(IPID, 10); } return remInterface; }
private JIStruct prepareForReleaseRef(String IPID, int numInstancesfirsttime) throws JIException { JIStruct remInterface = new JIStruct(); remInterface.addMember(new rpc.core.UUID(IPID)); remInterface.addMember(new Integer(numInstancesfirsttime + 5)); // numInstancesfirsttime of the original and 5 for the addRef done later on. remInterface.addMember(new Integer(0));//private refs = 0 if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().warning("prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: " + IPID + " session: " + getSessionIdentifier() + " , numInstancesfirsttime is " + numInstancesfirsttime); } debug_delIpids(IPID, numInstancesfirsttime + 5); return remInterface; }
private void releaseRefs ( final JIArray arrayOfStructs, final boolean fromDestroy ) throws JIException { logger.info ( "In releaseRefs for session : {} , array length is: {}", getSessionIdentifier (), (short) ( (Object[])arrayOfStructs.getArrayInstance () ).length ); final JICallBuilder obj = new JICallBuilder ( true ); obj.setOpnum ( 2 );//release //length obj.addInParamAsShort ( (short) ( (Object[])arrayOfStructs.getArrayInstance () ).length, JIFlags.FLAG_NULL ); obj.addInParamAsArray ( arrayOfStructs, JIFlags.FLAG_NULL ); obj.fromDestroySession = fromDestroy; this.stub2.addRef_ReleaseRef ( obj ); //ignore the results }
void releaseRef ( final String IPID, final int numinstances ) throws JIException { logger.info ( "releaseRef:Reclaiming from Session: {} , the IPID: {}, numinstances is {}", numinstances, new Object[] { getSessionIdentifier (), IPID, numinstances } ); final JICallBuilder obj = new JICallBuilder ( true ); obj.setParentIpid ( IPID ); obj.setOpnum ( 2 );//release //length obj.addInParamAsShort ( (short)1, JIFlags.FLAG_NULL ); //ipid to addfref on final JIArray array = new JIArray ( new rpc.core.UUID[] { new rpc.core.UUID ( IPID ) }, true ); obj.addInParamAsArray ( array, JIFlags.FLAG_NULL ); //TODO requesting 5 for now, will later build caching mechnaism to exhaust 5 refs first before asking for more // same with release. obj.addInParamAsInt ( numinstances, JIFlags.FLAG_NULL ); obj.addInParamAsInt ( 0, JIFlags.FLAG_NULL );//private refs = 0 if ( logger.isInfoEnabled () ) { debug_delIpids ( IPID, numinstances ); logger.info ( "releaseRef: Releasing numinstances {} references of IPID: {} session: {}", new Object[] { numinstances, IPID, getSessionIdentifier () } ); } this.stub2.addRef_ReleaseRef ( obj ); }
private void releaseRefs(JIArray arrayOfStructs, boolean fromDestroy) throws JIException { if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("In releaseRefs for session : " + getSessionIdentifier() + " , array length is: " + (short)(((Object[])arrayOfStructs.getArrayInstance()).length)); } JICallBuilder obj = new JICallBuilder(true); obj.setOpnum(2);//release //length obj.addInParamAsShort((short)(((Object[])arrayOfStructs.getArrayInstance()).length),JIFlags.FLAG_NULL); obj.addInParamAsArray(arrayOfStructs,JIFlags.FLAG_NULL); obj.fromDestroySession = fromDestroy; stub2.addRef_ReleaseRef(obj); //ignore the results }
private void releaseRefs(JIArray arrayOfStructs, boolean fromDestroy) throws JIException { if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("In releaseRefs for session : " + getSessionIdentifier() + " , array length is: " + (short)(((Object[])arrayOfStructs.getArrayInstance()).length)); } JICallBuilder obj = new JICallBuilder(true); obj.setOpnum(2);//release //length obj.addInParamAsShort((short)(((Object[])arrayOfStructs.getArrayInstance()).length),JIFlags.FLAG_NULL); obj.addInParamAsArray(arrayOfStructs,JIFlags.FLAG_NULL); obj.fromDestroySession = fromDestroy; stub.addRef_ReleaseRef(obj); //ignore the results }
@Override public void release () throws JIException { checkLocal (); final JICallBuilder obj = new JICallBuilder ( true ); obj.setParentIpid ( this.ptr.getIPID () ); obj.setOpnum ( 2 );//release //length obj.addInParamAsShort ( (short)1, JIFlags.FLAG_NULL ); //ipid to addfref on final JIArray array = new JIArray ( new rpc.core.UUID[] { new rpc.core.UUID ( this.ptr.getIPID () ) }, true ); obj.addInParamAsArray ( array, JIFlags.FLAG_NULL ); //TODO requesting 5 for now, will later build caching mechnaism to exhaust 5 refs first before asking for more // same with release. obj.addInParamAsInt ( 5, JIFlags.FLAG_NULL ); obj.addInParamAsInt ( 0, JIFlags.FLAG_NULL );//private refs = 0 if ( logger.isInfoEnabled () ) { logger.info ( "RELEASE called directly ! removing 5 references for " + this.ptr.getIPID () + " session: " + this.session.getSessionIdentifier () ); JISession.debug_delIpids ( this.ptr.getIPID (), 5 ); } this.session.getStub2 ().addRef_ReleaseRef ( obj ); }
public void release() throws JIException { checkLocal(); JICallBuilder obj = new JICallBuilder(true); obj.setParentIpid(ptr.getIPID()); obj.setOpnum(2);//release //length obj.addInParamAsShort((short)1,JIFlags.FLAG_NULL); //ipid to addfref on JIArray array = new JIArray(new rpc.core.UUID[]{new rpc.core.UUID(ptr.getIPID())},true); obj.addInParamAsArray(array,JIFlags.FLAG_NULL); //TODO requesting 5 for now, will later build caching mechnaism to exhaust 5 refs first before asking for more // same with release. obj.addInParamAsInt(5,JIFlags.FLAG_NULL); obj.addInParamAsInt(0,JIFlags.FLAG_NULL);//private refs = 0 if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().warning("RELEASE called directly ! removing 5 references for " + ptr.getIPID()+ " session: " + session.getSessionIdentifier()); JISession.debug_delIpids(ptr.getIPID(), 5); } session.getStub2().addRef_ReleaseRef(obj); }