Examples of addMetaData()


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);
      TestConnection tc = (TestConnection) c;
View Full Code Here

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

{
   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.addMetaData()

      {
         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.dependency.spi.ScopeInfo.addMetaData()

   public void addMetaData(ControllerContext context)
   {
      MutableMetaDataRepository repository = getMetaDataRepository();
      ScopeInfo scopeInfo = context.getScopeInfo();
      scopeInfo.addMetaData(repository, context);
   }

   public void removeMetaData(ControllerContext context)
   {
      MutableMetaDataRepository repository = getMetaDataRepository();
View Full Code Here

Examples of org.jboss.kernel.spi.metadata.KernelMetaDataRepository.addMetaData()

            ScopeInfo scopeInfo = context.getScopeInfo();
            ScopeKey scopeKey = new ScopeKey(scopeInfo.getScope().getScopes());
            scopeKey.addScope(CommonLevels.CLASS, info.getClassInfo().getType());
            scopeInfo.setScope(scopeKey);
            // re-register
            repository.addMetaData(context);

            // handle custom annotations
            applyAnnotations(context);
         }
View Full Code Here

Examples of org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader.addMetaData()

      if (delegate == null)
      {
         delegate = new MemoryMetaDataLoader(getThreadScopeKey(), false, true);
         threadLocal.set(delegate);
      }
      return delegate.addMetaData(metaData, type);
   }

   public <T> T removeMetaData(Class<T> type)
   {
      MemoryMetaDataLoader delegate = threadLocal.get();
View Full Code Here

Examples of org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader.addMetaData()

      if (delegate == null)
      {
         delegate = new MemoryMetaDataLoader(getThreadScopeKey(), false, true);
         threadLocal.set(delegate);
      }
      return delegate.addMetaData(name, metaData, type);
   }

   public <T> T removeMetaData(String name, Class<T> type)
   {
      MemoryMetaDataLoader delegate = threadLocal.get();
View Full Code Here

Examples of org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader.addMetaData()

         assertTrue(rdr.toString(), rdr.isEmpty());

      retrievals[0] = new AnnotatedElementMetaDataLoader(TestAnnotated.class);
      MemoryMetaDataLoader mmdl = new MemoryMetaDataLoader();
      TestAnnotation annotation = getAnnotation();
      mmdl.addMetaData(annotation, TestAnnotation.class);
      retrievals[1] = mmdl;
      retrievals[2] = new SimpleMetaDataLoader(new Annotation[]{annotation});
      ThreadLocalMetaDataLoader tlmdl = ThreadLocalMetaDataLoader.INSTANCE;
      tlmdl.addAnnotation(annotation);
      retrievals[3] = tlmdl;
View Full Code Here

Examples of org.jboss.metadata.spi.MutableMetaData.addMetaData()

         repository.addMetaDataRetrieval(retrieval);
      }
      if (retrieval instanceof MutableMetaData)
      {
         MutableMetaData mmd = (MutableMetaData)retrieval;
         mmd.addMetaData(tracker, ContextTracker.class);
      }
      else
      {
         log.info("Cannot add/modify default scoped metadata: " + retrieval);
      }
View Full Code Here

Examples of org.jboss.metadata.spi.MutableMetaData.addMetaData()

   }

   public <T> T addMetaData(Signature signature, String name, T metaData, Class<T> type)
   {
      MutableMetaData component = initRetrieval(signature);
      return component.addMetaData(name, metaData, type);
   }

   public <T> T addMetaData(Signature signature, T metaData, Class<T> type)
   {
      MutableMetaData component = initRetrieval(signature);
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.