Examples of SimpleMetaData


Examples of com.sun.appserv.ha.util.SimpleMetadata

        }
        JxtaBackingStoreImpl jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        ReplicationState transmitState = null;
        byte[] sessionState = ReplicationUtil.getByteArray(haSession, isReplicationCompressionEnabled());

        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(
                haSession.getVersion(),
                haSession.getInternalLastAccessedTime(),
                0L, //maxinactiveinterval
                sessionState,
                haSession.getExtraParameters() //containerExtraParam
            );
        if(haSession.getParentSASId() != null) {
            String beKey = SipApplicationSessionUtil.getSipApplicationKey(haSession.getParentSASId());
            simpleMetadata.setBeKey(beKey);
            simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        }
        try {
            transmitState = jxtaReplicator.getSimpleTransmitState(haSession.getId(), simpleMetadata);
        } catch (BackingStoreException ex) {}
        return transmitState;
View Full Code Here

Examples of com.sun.appserv.ha.util.SimpleMetadata

        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>updateContainerExtraParam: replicator: " + replicator);                      
        }        
        try {
            SimpleMetadata smd = SimpleMetadataFactory.createSimpleMetadata(
                    sipSession.getInternalLastAccessedTime(), //internallastaccesstime
                    sipSession.getVersion(), //version
                    sipSession.getExtraParameters());
            replicator.save(sipSession.getId(), smd, sipSession.isReplicated()); //containerExtraParams
        } catch (BackingStoreException ex) {
View Full Code Here

Examples of org.glassfish.ha.store.util.SimpleMetadata

        }
    }

    SimpleMetadata getSFSBBeanState(SessionContextImpl sc) {
        //No need to synchronize
        SimpleMetadata simpleMetadata = null;
        try {

            if ((containerState != CONTAINER_STARTED) && (containerState != CONTAINER_STOPPED)) {
                _logger.log(Level.FINE, "getSFSBBeanState() returning because "
                        + "containerState: " + containerState);
                return null;
            }

            if (sc.getState() == BeanState.DESTROYED) {
                return null;
            }

            Object ejb = sc.getEJB();

            EjbInvocation ejbInv = createEjbInvocation(ejb, sc);
            invocationManager.preInvoke(ejbInv);
            boolean needToDoPostInvokeTx = false;
            boolean destroyBean = false;

            synchronized (sc) {
                try {
                    needToDoPostInvokeTx = callLifecycleCallbackInTxIfUsed(ejbInv, sc,
                            prePassivateInvInfo, CallbackType.PRE_PASSIVATE);
                    sc.setLastPersistedAt(System.currentTimeMillis());
                    long newCtxVersion = sc.incrementAndGetVersion();
                    byte[] serializedState = EjbContainerUtilImpl.getInstance().getJavaEEIOUtils().serializeObject(sc, true);
                    simpleMetadata = new SimpleMetadata(sc.getVersion(),
                            System.currentTimeMillis(),
                            removalGracePeriodInSeconds*1000L, serializedState);
                    simpleMetadata.setVersion(newCtxVersion);
                    needToDoPostInvokeTx = callLifecycleCallbackInTxIfUsed(ejbInv, sc,
                            postActivateInvInfo, CallbackType.POST_ACTIVATE);
                    //Do not set sc.setExistsInStore() here
                } catch (java.io.NotSerializableException serEx) {
                    _logger.log(Level.WARNING, "Error  during checkpoint ("
View Full Code Here

Examples of org.jboss.aop.metadata.SimpleMetaData

{
   public void testConnectionManager() throws Exception
   {
      ConnectionManager cm = new TestConnectionManager();
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      SimpleMetaData metadata = new SimpleMetaData();
     
      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_FACTORY, ConnectionFactoryInterceptor.CONNECTION_MANAGER, cm);
      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_MANAGER, ConnectionFactoryInterceptor.MANAGED_CONNECTION_FACTORY, mcf);
      DataSource ds = (DataSource) assertCreateHollowProxy(new Class[] { DataSource.class }, metadata, DataSource.class);
      Connection c = ds.getConnection();
      assertNotNull(c);
      assertTrue(c instanceof TestConnection);
      TestConnection tc = (TestConnection) c;
View Full Code Here

Examples of org.jboss.aop.metadata.SimpleMetaData

public class SimpleMetaDataTestCase extends AbstractProxyTest
{
   public void testSimpleMetaData() throws Exception
   {
      SimpleBean bean = new SimpleBean();
      SimpleMetaData metaData = new SimpleMetaData();
      metaData.addMetaData("Simple", "MetaData", "Value");
      Simple simple = (Simple) assertCreateProxy(bean, new Class[] { Simple.class }, metaData, Simple.class);
      SimpleInterceptor.invoked = null;
      simple.doSomething();
      assertTrue(bean.invoked);
      Method invoked = SimpleInterceptor.invoked;
View Full Code Here

Examples of org.jboss.aop.metadata.SimpleMetaData

      return "MockNextInterceptor";
   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      SimpleMetaData latest = new SimpleMetaData();
      latest.mergeIn(invocation.getMetaData());
      invocationMetaData.add(latest);
      Object result = null;
      if (returnValues != null)
      {
         try
View Full Code Here

Examples of org.jboss.aop.metadata.SimpleMetaData

      ClusteredPojiProxy proxy = new ClusteredPojiProxy(oid, uri, new Interceptor[]{interceptor}, wrapper, lbp, FAMILY_BASE, originTarget);
     
      assertEquals(OK, proxy.invoke(this, Object.class.getDeclaredMethod("toString", new Class[]{}), new Object[]{}));
     
      List<SimpleMetaData> history = interceptor.getInvocationHistory();
      SimpleMetaData metadata = history.get(0);
      assertSame(wrapper, metadata.getMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.CLUSTER_FAMILY_WRAPPER));
      assertSame(lbp, metadata.getMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.LOADBALANCE_POLICY));
      assertSame(FAMILY_BASE, metadata.getMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.PARTITION_NAME));
      assertSame(originTarget, metadata.getMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.HA_TARGET));
      assertSame(oid, metadata.getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID));
      assertSame(uri, metadata.getMetaData(InvokeRemoteInterceptor.REMOTING, InvokeRemoteInterceptor.INVOKER_LOCATOR));
      assertEquals("AOP", metadata.getMetaData(InvokeRemoteInterceptor.REMOTING, InvokeRemoteInterceptor.SUBSYSTEM));
     
   }
View Full Code Here

Examples of org.jboss.aop.metadata.SimpleMetaData

   }

   public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
   {
      SimpleMetaData instanceData = instanceAdvisor.getMetaData();
      QueuedTxLock lock = null;
      synchronized(instanceData)
      {
         lock = (QueuedTxLock)instanceData.getMetaData(QueuedTxLock.TXLOCK, QueuedTxLock.TXLOCK);
         if (lock == null)
         {
            lock = new QueuedTxLock();
            instanceData.addMetaData(QueuedTxLock.TXLOCK, QueuedTxLock.TXLOCK, lock, PayloadKey.TRANSIENT);
         }
      }
      return new TxLockInterceptor(getTransactionManager(), lock);
   }
View Full Code Here

Examples of org.jboss.aop.metadata.SimpleMetaData

      }
   }

   public static String getDefaultMetadataXml(int indent, PrintWriter pw, ClassAdvisor advisor)
   {
      SimpleMetaData metadata = advisor.getDefaultMetaData();

      indent++;
      StringBuffer xml = getMetadataXml(indent, advisor, metadata);

      if (xml != null)
View Full Code Here

Examples of org.jboss.aop.metadata.SimpleMetaData

      return "";
   }

   public static String getClassMetadataXml(int indent, PrintWriter pw, ClassAdvisor advisor)
   {
      SimpleMetaData metadata = advisor.getClassMetaData();

      indent++;
      StringBuffer xml = getMetadataXml(indent, advisor, metadata);

      if (xml != null)
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.