Package org.jboss.aop.metadata

Examples of org.jboss.aop.metadata.SimpleMetaData.addMetaData()


   {
      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);
View Full Code Here


      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

{
   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

   protected void addMetadataToInvocation(MethodInvocation methodInvocation)
   {
      super.addMetadataToInvocation(methodInvocation);
     
      SimpleMetaData metadata = methodInvocation.getMetaData();
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.CLUSTER_FAMILY_WRAPPER, family, PayloadKey.TRANSIENT);
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.LOADBALANCE_POLICY, lbPolicy, PayloadKey.TRANSIENT);
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.PARTITION_NAME, partitionName, PayloadKey.TRANSIENT);
     
      if (this.usePreferredTarget)
      {
View Full Code Here

   {
      super.addMetadataToInvocation(methodInvocation);
     
      SimpleMetaData metadata = methodInvocation.getMetaData();
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.CLUSTER_FAMILY_WRAPPER, family, PayloadKey.TRANSIENT);
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.LOADBALANCE_POLICY, lbPolicy, PayloadKey.TRANSIENT);
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.PARTITION_NAME, partitionName, PayloadKey.TRANSIENT);
     
      if (this.usePreferredTarget)
      {
         metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.HA_TARGET, getUri(), PayloadKey.TRANSIENT);
View Full Code Here

      super.addMetadataToInvocation(methodInvocation);
     
      SimpleMetaData metadata = methodInvocation.getMetaData();
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.CLUSTER_FAMILY_WRAPPER, family, PayloadKey.TRANSIENT);
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.LOADBALANCE_POLICY, lbPolicy, PayloadKey.TRANSIENT);
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.PARTITION_NAME, partitionName, PayloadKey.TRANSIENT);
     
      if (this.usePreferredTarget)
      {
         metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.HA_TARGET, getUri(), PayloadKey.TRANSIENT);
      }
View Full Code Here

      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.LOADBALANCE_POLICY, lbPolicy, PayloadKey.TRANSIENT);
      metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.PARTITION_NAME, partitionName, PayloadKey.TRANSIENT);
     
      if (this.usePreferredTarget)
      {
         metadata.addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.HA_TARGET, getUri(), PayloadKey.TRANSIENT);
      }
   }
  
}
View Full Code Here

/*     */
/*     */   public GUID tag(InstanceAdvised advised)
/*     */   {
/*  67 */     GUID guid = new GUID();
/*  68 */     SimpleMetaData metaData = advised._getInstanceAdvisor().getMetaData();
/*  69 */     metaData.addMetaData("VERSION_MANAGER", "VERSION_ID", guid);
/*  70 */     return guid;
/*     */   }
/*     */
/*     */   public void untag(InstanceAdvised advised)
/*     */   {
View Full Code Here

/*     */   public void addVersioning(DistributedPOJOState manager, Advised advised)
/*     */   {
/* 221 */     StateManager.setStateManager(advised, manager);
/* 222 */     StateChangeInterceptor interceptor = new StateChangeInterceptor(manager);
/* 223 */     SimpleMetaData metaData = advised._getInstanceAdvisor().getMetaData();
/* 224 */     metaData.addMetaData("VERSION_MANAGER", "VERSION_ID", manager.getGUID());
/* 225 */     advised._getInstanceAdvisor().appendInterceptor(interceptor);
/*     */   }
/*     */
/*     */   public ClassProxy addListVersioning(List list, DistributedListState manager)
/*     */     throws Exception
View Full Code Here

/*     */     throws Exception
/*     */   {
/* 234 */     ClassProxy proxy = ClassProxyFactory.newInstance(list.getClass());
/* 235 */     GUID guid = manager.getGUID();
/* 236 */     SimpleMetaData metaData = proxy._getInstanceAdvisor().getMetaData();
/* 237 */     metaData.addMetaData("VERSION_MANAGER", "VERSION_ID", guid);
/* 238 */     StateManager.setStateManager(proxy, manager);
/* 239 */     CollectionStateChangeInterceptor interceptor = new CollectionStateChangeInterceptor(manager);
/* 240 */     proxy._getInstanceAdvisor().appendInterceptor(interceptor);
/* 241 */     return proxy;
/*     */   }
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.