Package org.jboss.ejb

Examples of org.jboss.ejb.EntityCache


    */
   private Object invokeScheduleForCascadeDelete(Transaction tx, Object myId)
   {
      try
      {
         EntityCache instanceCache = (EntityCache) manager.getContainer().getInstanceCache();
         SecurityContext sc = SecurityActions.getSecurityContext();
        
         CMRInvocation invocation = new CMRInvocation();
         invocation.setCmrMessage(CMRMessage.SCHEDULE_FOR_CASCADE_DELETE);
         invocation.setEntrancy(Entrancy.NON_ENTRANT);
         invocation.setId(instanceCache.createCacheKey(myId));
         invocation.setArguments(new Object[]{this});
         invocation.setTransaction(tx);
         invocation.setPrincipal(sc.getUtil().getUserPrincipal());
         invocation.setCredential(sc.getUtil().getCredential());
         invocation.setType(InvocationType.LOCAL);
View Full Code Here


    */
   private Object invokeScheduleForBatchCascadeDelete(Transaction tx, Object myId)
   {
      try
      {
         EntityCache instanceCache = (EntityCache) manager.getContainer().getInstanceCache();
         SecurityContext sc = SecurityActions.getSecurityContext();
        
         CMRInvocation invocation = new CMRInvocation();
         invocation.setCmrMessage(CMRMessage.SCHEDULE_FOR_BATCH_CASCADE_DELETE);
         invocation.setEntrancy(Entrancy.NON_ENTRANT);
         invocation.setId(instanceCache.createCacheKey(myId));
         invocation.setArguments(new Object[]{this});
         invocation.setTransaction(tx);
         invocation.setPrincipal(sc.getUtil().getUserPrincipal());
         invocation.setCredential(sc.getUtil().getCredential());
         invocation.setType(InvocationType.LOCAL);
View Full Code Here

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

   private void invokeAddRelation(Transaction tx, Object myId, Object relatedId)
   {
      try
      {
         SecurityContext sc = SecurityActions.getSecurityContext();
         EntityCache instanceCache = (EntityCache) manager.getContainer().getInstanceCache();

         CMRInvocation invocation = new CMRInvocation();
         invocation.setCmrMessage(CMRMessage.ADD_RELATION);
         invocation.setEntrancy(Entrancy.NON_ENTRANT);
         invocation.setId(instanceCache.createCacheKey(myId));
         invocation.setArguments(new Object[]{this, relatedId});
         invocation.setTransaction(tx);
         invocation.setPrincipal(sc.getUtil().getUserPrincipal());
         invocation.setCredential(sc.getUtil().getCredential());
         invocation.setType(InvocationType.LOCAL);
View Full Code Here

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

         }
        
         if(log.isTraceEnabled())
            log.trace("Flushing the valid contexts " + container.getBeanMetaData().getEjbName());

         EntityCache cache = (EntityCache) container.getInstanceCache();
         try
         {
            if(cache != null)
               cache.flush();
         }
         catch (Throwable t)
         {
            log.debug("Ignored error while trying to flush() entity cache", t);
         }
View Full Code Here

   private void invokeRemoveRelatedId(Object myId, Object relatedId)
   {
      try
      {
         Transaction tx = getTransaction();
         EntityCache instanceCache = (EntityCache)manager.getContainer().getInstanceCache();

         /*
         RelationInterceptor.RelationInvocation invocation =
            new RelationInterceptor.RelationInvocation(RelationInterceptor.CMRMessage.REMOVE_RELATED_ID);
         invocation.setId(instanceCache.createCacheKey(myId));
         invocation.setArguments(new Object[]{this, relatedId});
         invocation.setTransaction(tx);
         invocation.setPrincipal(SecurityAssociation.getPrincipal());
         invocation.setCredential(SecurityAssociation.getCredential());
         invocation.setType(InvocationType.LOCAL);
         */

         SecurityActions actions = SecurityActions.UTIL.getSecurityActions();

         CMRInvocation invocation = new CMRInvocation();
         invocation.setCmrMessage(CMRMessage.REMOVE_RELATION);
         invocation.setEntrancy(Entrancy.NON_ENTRANT);
         invocation.setId(instanceCache.createCacheKey(myId));
         invocation.setArguments(new Object[]{this, relatedId});
         invocation.setTransaction(tx);
         invocation.setPrincipal(actions.getPrincipal());
         invocation.setCredential(actions.getCredential());
         invocation.setType(InvocationType.LOCAL);
View Full Code Here

   private void invokeAddRelatedId(Object myId, Object relatedId)
   {
      try
      {
         Transaction tx = getTransaction();
         EntityCache instanceCache = (EntityCache)manager.getContainer().getInstanceCache();
         /*
         RelationInterceptor.RelationInvocation invocation =
            new RelationInterceptor.RelationInvocation(RelationInterceptor.CMRMessage.ADD_RELATED_ID);
         invocation.setId(instanceCache.createCacheKey(myId));
         invocation.setArguments(new Object[]{this, relatedId});
         invocation.setTransaction(tx);
         invocation.setPrincipal(SecurityAssociation.getPrincipal());
         invocation.setCredential(SecurityAssociation.getCredential());
         invocation.setType(InvocationType.LOCAL);
         */
         SecurityActions actions = SecurityActions.UTIL.getSecurityActions();

         CMRInvocation invocation = new CMRInvocation();
         invocation.setCmrMessage(CMRMessage.ADD_RELATION);
         invocation.setEntrancy(Entrancy.NON_ENTRANT);
         invocation.setId(instanceCache.createCacheKey(myId));
         invocation.setArguments(new Object[]{this, relatedId});
         invocation.setTransaction(tx);
         invocation.setPrincipal(actions.getPrincipal());
         invocation.setCredential(actions.getCredential());
         invocation.setType(InvocationType.LOCAL);
View Full Code Here

/*      */
/*      */   private Object invokeScheduleForCascadeDelete(Transaction tx, Object myId)
/*      */   {
/*      */     try
/*      */     {
/* 1084 */       EntityCache instanceCache = (EntityCache)this.manager.getContainer().getInstanceCache();
/* 1085 */       SecurityContext sc = SecurityActions.getSecurityContext();
/*      */
/* 1087 */       CMRInvocation invocation = new CMRInvocation();
/* 1088 */       invocation.setCmrMessage(CMRMessage.SCHEDULE_FOR_CASCADE_DELETE);
/* 1089 */       invocation.setEntrancy(Entrancy.NON_ENTRANT);
/* 1090 */       invocation.setId(instanceCache.createCacheKey(myId));
/* 1091 */       invocation.setArguments(new Object[] { this });
/* 1092 */       invocation.setTransaction(tx);
/* 1093 */       invocation.setPrincipal(sc.getUtil().getUserPrincipal());
/* 1094 */       invocation.setCredential(sc.getUtil().getCredential());
/* 1095 */       invocation.setType(InvocationType.LOCAL);
View Full Code Here

/*      */
/*      */   private Object invokeScheduleForBatchCascadeDelete(Transaction tx, Object myId)
/*      */   {
/*      */     try
/*      */     {
/* 1115 */       EntityCache instanceCache = (EntityCache)this.manager.getContainer().getInstanceCache();
/* 1116 */       SecurityContext sc = SecurityActions.getSecurityContext();
/*      */
/* 1118 */       CMRInvocation invocation = new CMRInvocation();
/* 1119 */       invocation.setCmrMessage(CMRMessage.SCHEDULE_FOR_BATCH_CASCADE_DELETE);
/* 1120 */       invocation.setEntrancy(Entrancy.NON_ENTRANT);
/* 1121 */       invocation.setId(instanceCache.createCacheKey(myId));
/* 1122 */       invocation.setArguments(new Object[] { this });
/* 1123 */       invocation.setTransaction(tx);
/* 1124 */       invocation.setPrincipal(sc.getUtil().getUserPrincipal());
/* 1125 */       invocation.setCredential(sc.getUtil().getCredential());
/* 1126 */       invocation.setType(InvocationType.LOCAL);
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.