Examples of EntityCache


Examples of org.jboss.ejb.EntityCache

/*      */
/*      */   private void invokeRemoveRelation(Transaction tx, Object myId, Object relatedId)
/*      */   {
/*      */     try
/*      */     {
/* 1211 */       EntityCache instanceCache = (EntityCache)this.manager.getContainer().getInstanceCache();
/* 1212 */       SecurityContext sc = SecurityActions.getSecurityContext();
/*      */
/* 1214 */       CMRInvocation invocation = new CMRInvocation();
/* 1215 */       invocation.setCmrMessage(CMRMessage.REMOVE_RELATION);
/* 1216 */       invocation.setEntrancy(Entrancy.NON_ENTRANT);
/* 1217 */       invocation.setId(instanceCache.createCacheKey(myId));
/* 1218 */       invocation.setArguments(new Object[] { this, relatedId });
/* 1219 */       invocation.setTransaction(tx);
/* 1220 */       invocation.setPrincipal(sc.getUtil().getUserPrincipal());
/* 1221 */       invocation.setCredential(sc.getUtil().getCredential());
/* 1222 */       invocation.setType(InvocationType.LOCAL);
View Full Code Here

Examples of org.jboss.ejb.EntityCache

/*      */   private void invokeRemoveRelatedId(Object myId, Object relatedId)
/*      */   {
/*      */     try
/*      */     {
/*  554 */       Transaction tx = getTransaction();
/*  555 */       EntityCache instanceCache = (EntityCache)this.manager.getContainer().getInstanceCache();
/*      */
/*  568 */       SecurityActions actions = JDBCCMRFieldBridge2.SecurityActions.UTIL.getSecurityActions();
/*      */
/*  570 */       CMRInvocation invocation = new CMRInvocation();
/*  571 */       invocation.setCmrMessage(CMRMessage.REMOVE_RELATION);
/*  572 */       invocation.setEntrancy(Entrancy.NON_ENTRANT);
/*  573 */       invocation.setId(instanceCache.createCacheKey(myId));
/*  574 */       invocation.setArguments(new Object[] { this, relatedId });
/*  575 */       invocation.setTransaction(tx);
/*  576 */       invocation.setPrincipal(actions.getPrincipal());
/*  577 */       invocation.setCredential(actions.getCredential());
/*  578 */       invocation.setType(InvocationType.LOCAL);
View Full Code Here

Examples of org.jboss.ejb.EntityCache

/*      */   private void invokeAddRelatedId(Object myId, Object relatedId)
/*      */   {
/*      */     try
/*      */     {
/*  596 */       Transaction tx = getTransaction();
/*  597 */       EntityCache instanceCache = (EntityCache)this.manager.getContainer().getInstanceCache();
/*      */
/*  608 */       SecurityActions actions = JDBCCMRFieldBridge2.SecurityActions.UTIL.getSecurityActions();
/*      */
/*  610 */       CMRInvocation invocation = new CMRInvocation();
/*  611 */       invocation.setCmrMessage(CMRMessage.ADD_RELATION);
/*  612 */       invocation.setEntrancy(Entrancy.NON_ENTRANT);
/*  613 */       invocation.setId(instanceCache.createCacheKey(myId));
/*  614 */       invocation.setArguments(new Object[] { this, relatedId });
/*  615 */       invocation.setTransaction(tx);
/*  616 */       invocation.setPrincipal(actions.getPrincipal());
/*  617 */       invocation.setCredential(actions.getCredential());
/*  618 */       invocation.setType(InvocationType.LOCAL);
View Full Code Here

Examples of org.jboss.ejb.EntityCache

/*     */       }
/*     */
/* 545 */       if (EntitySynchronizationInterceptor.this.log.isTraceEnabled()) {
/* 546 */         EntitySynchronizationInterceptor.this.log.trace("Flushing the valid contexts " + EntitySynchronizationInterceptor.this.container.getBeanMetaData().getEjbName());
/*     */       }
/* 548 */       EntityCache cache = (EntityCache)EntitySynchronizationInterceptor.this.container.getInstanceCache();
/*     */       try
/*     */       {
/* 551 */         if (cache != null)
/* 552 */           cache.flush();
/*     */       }
/*     */       catch (Throwable t)
/*     */       {
/* 556 */         EntitySynchronizationInterceptor.this.log.debug("Ignored error while trying to flush() entity cache", t);
/*     */       }
View Full Code Here

Examples of org.jboss.ejb.EntityCache

/*     */       }
/*     */
/* 545 */       if (EntitySynchronizationInterceptor.this.log.isTraceEnabled()) {
/* 546 */         EntitySynchronizationInterceptor.this.log.trace("Flushing the valid contexts " + EntitySynchronizationInterceptor.this.container.getBeanMetaData().getEjbName());
/*     */       }
/* 548 */       EntityCache cache = (EntityCache)EntitySynchronizationInterceptor.this.container.getInstanceCache();
/*     */       try
/*     */       {
/* 551 */         if (cache != null)
/* 552 */           cache.flush();
/*     */       }
/*     */       catch (Throwable t)
/*     */       {
/* 556 */         EntitySynchronizationInterceptor.this.log.debug("Ignored error while trying to flush() entity cache", t);
/*     */       }
View Full Code Here

Examples of org.mongodb.morphia.mapping.cache.EntityCache

        final long start = System.nanoTime();
        final List<DBObject> list = getDs().getDB().getCollection("Address")
                                        .find()
                                        .sort(new BasicDBObject("name", 1))
                                        .toArray();
        final EntityCache entityCache = new DefaultEntityCache();
        final List<Address> resultList = new LinkedList<Address>();
        for (final DBObject dbObject : list) {
            final Address address = getMorphia().fromDBObject(Address.class, dbObject, entityCache);
            resultList.add(address);
        }
View Full Code Here

Examples of org.mongodb.morphia.mapping.cache.EntityCache

        //TODO remove this after testing.
        if (dbColl == null) {
            dbColl = getCollection(qi.getEntityClass());
        }

        final EntityCache cache = createCache();

        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing findAndModify(" + dbColl.getName() + ") with delete ...");
        }
View Full Code Here

Examples of org.mongodb.morphia.mapping.cache.EntityCache

        if (LOG.isTraceEnabled()) {
            LOG.info("Executing " + cmd.toString());
        }

        final EntityCache cache = createCache();
        MapreduceResults<T> results = new MapreduceResults<T>(dbColl.mapReduce(baseCommand));

        results.setType(type);
        if (MapreduceType.INLINE.equals(type)) {
            results.setInlineRequiredOptions(outputType, getMapper(), cache);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.