Package org.drools.persistence.info

Examples of org.drools.persistence.info.SessionInfo


        String className = marshalledClassInstance.getClass().getName();
        this.marshalledObjectClassName = className;
      
        // Object specific actions
        if( className.equals(SessionInfo.class.getName()) ) {
            SessionInfo sessionInfo = (SessionInfo) marshalledClassInstance;
            this.byteArray = sessionInfo.getData();
            this.marshalledObjectId = sessionInfo.getId().longValue();
            if( STORE_KNOWLEDGE_BASE ) {
                try {
                    storeAssociatedKnowledgeBase(sessionInfo);
                } catch(IOException ioe ) {
                    Assert.fail("Unable to retrieve marshalled data or id for " + className + " object: ["
View Full Code Here


        // update the session id to be the same as the session info id
        ((InternalKnowledgeRuntime) ksession).setId( this.sessionInfo.getId() );
    }

    protected void initNewKnowledgeSession(KieBase kbase, KieSessionConfiguration conf) {
        this.sessionInfo = new SessionInfo();

        // create session but bypass command service
        this.ksession = kbase.newKieSession( conf,
                                             this.env );
View Full Code Here

        }
        ksessions.put( entity.getId(), entity );
    }

    public SessionInfo findSessionInfo(Integer sessionId) {
        SessionInfo sessionInfo = ksessions.get( sessionId );
        if(sessionInfo == null){
            sessionInfo = storage.findSessionInfo( sessionId );
            ksessions.put( sessionId, sessionInfo );
        }
        return sessionInfo;
View Full Code Here

     * @param args The arguments to EntityManager.persist(...)
     */
    private void persist(String methodName, Object[] args) {
        MarshalledData marshalledData = null;
        if( args[0] instanceof SessionInfo ) {
            SessionInfo sessionInfo = (SessionInfo) args[0];
            byte [] byteArray = sessionInfo.getData();
            managedSessionInfoDataMap.get().put(sessionInfo, byteArray != null ? byteArray.clone() : null );
            if( byteArray != null ) {
                marshalledData = new MarshalledData(sessionInfo);
                em.persist(marshalledData);
                logger.trace("-.-: " + marshalledData);
View Full Code Here

        // update the session id to be the same as the session info id
        ((InternalKnowledgeRuntime) ksession).setId( this.sessionInfo.getId() );
    }

    protected void initNewKnowledgeSession(KieBase kbase, KieSessionConfiguration conf) {
        this.sessionInfo = new SessionInfo();

        // create session but bypass command service
        this.ksession = kbase.newKieSession( conf,
                                             this.env );
View Full Code Here

        }
        this.env = env;
       
        checkEnvironment( this.env );
       
        this.sessionInfo = new SessionInfo();

        initTransactionManager( this.env );
       
        // create session but bypass command service
        this.ksession = kbase.newStatefulKnowledgeSession(conf, this.env);
View Full Code Here

        }
        this.env = env;
       
        checkEnvironment( this.env );
       
        this.sessionInfo = new SessionInfo();

        initTransactionManager( this.env );
       
        // create session but bypass command service
        this.ksession = kbase.newStatefulKnowledgeSession(conf, this.env);
View Full Code Here

        }
        this.env = env;
       
        checkEnvironment( this.env );
       
        this.sessionInfo = new SessionInfo();

        initTransactionManager( this.env );
       
        // create session but bypass command service
        this.ksession = kbase.newStatefulKnowledgeSession(conf, this.env);
View Full Code Here

        // update the session id to be the same as the session info id
        ((InternalKnowledgeRuntime) ksession).setId( this.sessionInfo.getId() );
    }

    protected void initNewKnowledgeSession(KieBase kbase, KieSessionConfiguration conf) {
        this.sessionInfo = new SessionInfo();

        // create session but bypass command service
        this.ksession = kbase.newKieSession( conf,
                                             this.env );
View Full Code Here

        }
        this.env = env;

        checkEnvironment( this.env );

        this.sessionInfo = new SessionInfo();

        initTransactionManager( this.env );

        // create session but bypass command service
        this.ksession = kbase.newStatefulKnowledgeSession( conf,
View Full Code Here

TOP

Related Classes of org.drools.persistence.info.SessionInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.