Package org.jboss.ejb

Examples of org.jboss.ejb.EntityCache


/*      */
/*      */   private Object invokeGetRelatedId(Transaction tx, Object myId)
/*      */   {
/*      */     try
/*      */     {
/* 1147 */       EntityCache instanceCache = (EntityCache)this.manager.getContainer().getInstanceCache();
/* 1148 */       SecurityContext sc = SecurityActions.getSecurityContext();
/*      */
/* 1150 */       CMRInvocation invocation = new CMRInvocation();
/* 1151 */       invocation.setCmrMessage(CMRMessage.GET_RELATED_ID);
/* 1152 */       invocation.setEntrancy(Entrancy.NON_ENTRANT);
/* 1153 */       invocation.setId(instanceCache.createCacheKey(myId));
/* 1154 */       invocation.setArguments(new Object[] { this });
/* 1155 */       invocation.setTransaction(tx);
/* 1156 */       invocation.setPrincipal(sc.getUtil().getUserPrincipal());
/* 1157 */       invocation.setCredential(sc.getUtil().getCredential());
/* 1158 */       invocation.setType(InvocationType.LOCAL);
View Full Code Here


/*      */   private void invokeAddRelation(Transaction tx, Object myId, Object relatedId)
/*      */   {
/*      */     try
/*      */     {
/* 1179 */       SecurityContext sc = SecurityActions.getSecurityContext();
/* 1180 */       EntityCache instanceCache = (EntityCache)this.manager.getContainer().getInstanceCache();
/*      */
/* 1182 */       CMRInvocation invocation = new CMRInvocation();
/* 1183 */       invocation.setCmrMessage(CMRMessage.ADD_RELATION);
/* 1184 */       invocation.setEntrancy(Entrancy.NON_ENTRANT);
/* 1185 */       invocation.setId(instanceCache.createCacheKey(myId));
/* 1186 */       invocation.setArguments(new Object[] { this, relatedId });
/* 1187 */       invocation.setTransaction(tx);
/* 1188 */       invocation.setPrincipal(sc.getUtil().getUserPrincipal());
/* 1189 */       invocation.setCredential(sc.getUtil().getCredential());
/* 1190 */       invocation.setType(InvocationType.LOCAL);
View Full Code Here

/*      */
/*      */   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

/*      */   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

/*      */   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

/*     */       }
/*     */
/* 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

/*     */       }
/*     */
/* 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

TOP

Related Classes of org.jboss.ejb.EntityCache

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.