• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BeansDescriptor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor的典型用法代码示例。如果您正苦于以下问题:Java BeansDescriptor类的具体用法?Java BeansDescriptor怎么用?Java BeansDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BeansDescriptor类属于org.jboss.shrinkwrap.descriptor.api.beans10包,在下文中一共展示了BeansDescriptor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createDeployment

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment(testable = false)
public static JavaArchive createDeployment() throws Exception {
    ResourceDeployer.addQueue(INPUT_QUEUE);
    ResourceDeployer.addQueue(INPUT_INOUT_QUEUE);
    ResourceDeployer.addQueue(INPUT_INOUT_PHYSICAL_NAME_QUEUE + "_physical", INPUT_INOUT_PHYSICAL_NAME_QUEUE + "_jndi");
    ResourceDeployer.addQueue(INOUT_REPLY_TO_QUEUE);
    ResourceDeployer.addQueue(INOUT_REPLY_TO_PHYSICAL_NAME_QUEUE + "_physical", INOUT_REPLY_TO_PHYSICAL_NAME_QUEUE + "_jndi");
    ResourceDeployer.addQueue(INOUT_FAULT_TO_QUEUE);
    ResourceDeployer.addQueue(INOUT_FAULT_TO_PHYSICAL_NAME_QUEUE + "_physical", INOUT_FAULT_TO_PHYSICAL_NAME_QUEUE + "_jndi");
    ResourceDeployer.addQueue(RESULT_QUEUE);
    ResourceDeployer.addQueue(FAULT_QUEUE);

    URL testConfigUrl = Classes.getResource(TEST_CONFIG);
    String beansXml = Descriptors.create(BeansDescriptor.class).exportAsString();
    return ShrinkWrap.create(JavaArchive.class, "switchyard-JCAJMSServiceBindingTest.jar")
                     .addClass(JCAJMSService.class)
                     .addClass(JCAJMSServiceImpl.class)
                     .addClass(JCAJMSFault.class)
                     .addClass(MyJMSContextMapper.class)
                     .addClass(MyJMSMessageComposer.class)
                     .addAsManifestResource(new UrlAsset(testConfigUrl), "switchyard.xml")
                     .addAsManifestResource(new StringAsset(beansXml), "beans.xml");
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:24,代码来源:JCAJMSServiceBindingTest.java


示例2: war

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment
public static WebArchive war()
{
    String simpleName = EnableInterceptorsTest.class.getSimpleName();
    String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1);

    // CDI 1.0/Weld 1.x needs EnableInterceptorsInterceptor
    BeansDescriptor beansWithEnablingInterceptor = Descriptors.create(BeansDescriptor.class);
    beansWithEnablingInterceptor.getOrCreateInterceptors().clazz(EnableInterceptorsInterceptor.class.getName());
    
    // war archive needs MyBeanInterceptor enabled
    BeansDescriptor beans = Descriptors.create(BeansDescriptor.class);
    beans.getOrCreateInterceptors().clazz(MyBeanInterceptor.class.getName());
      
    JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, archiveName + ".jar")
            .addPackage(EnableInterceptorsTest.class.getPackage())
            .addAsManifestResource(new StringAsset(beansWithEnablingInterceptor.exportAsString()), "beans.xml");

    return ShrinkWrap.create(WebArchive.class, archiveName + ".war")
            .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndProxyArchive())
            .addAsLibraries(testJar)
            .addAsWebInfResource(new StringAsset(beans.exportAsString()), "beans.xml");
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:24,代码来源:EnableInterceptorsTest.java


示例3: createDeployment

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment(order = 2)
public static JavaArchive createDeployment() throws Exception {
    URL testConfigUrl = Classes.getResource(TEST_CONFIG);
    URL deploymentStructureUrl = Classes.getResource(DEPLOYMENT_STRUCTURE);
    URL jndiProperties = Classes.getResource(JNDI_PROPERTIES);
    String beansXml = Descriptors.create(BeansDescriptor.class).exportAsString();
    return ShrinkWrap.create(JavaArchive.class, APP_NAME)
                     .addClass(JCACCIReference.class)
                     .addClass(JCACCIReferenceService.class)
                     .addClass(JCACCIReferenceServiceImpl.class)
                     .addAsResource(new UrlAsset(jndiProperties), "jndi.properties")
                     .addAsManifestResource(new UrlAsset(deploymentStructureUrl), "jboss-deployment-structure.xml")
                     .addAsManifestResource(new UrlAsset(testConfigUrl), "switchyard.xml")
                     .addAsManifestResource(new StringAsset(beansXml), "beans.xml");
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:16,代码来源:JCACCIReferenceBindingTest.java


示例4: createDeployment

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment(order = 2)
public static JavaArchive createDeployment() throws Exception {
    URL testConfigUrl = Classes.getResource(TEST_CONFIG);
    URL deploymentStructureUrl = Classes.getResource(DEPLOYMENT_STRUCTURE);
    String beansXml = Descriptors.create(BeansDescriptor.class).exportAsString();
    return ShrinkWrap.create(JavaArchive.class, APP_NAME)
                     .addClass(JCACCIService.class)
                     .addClass(JCACCIServiceImpl.class)
                     .addAsManifestResource(new UrlAsset(deploymentStructureUrl), "jboss-deployment-structure.xml")
                     .addAsManifestResource(new UrlAsset(testConfigUrl), "switchyard.xml")
                     .addAsManifestResource(new StringAsset(beansXml), "beans.xml");
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:13,代码来源:JCACCIServiceBindingTest.java


示例5: createDeployment

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment(testable = false)
public static JavaArchive createDeployment() throws Exception {
    ResourceDeployer.addQueue(INPUT_TX_QUEUE);
    ResourceDeployer.addQueue(INPUT_NOTX_QUEUE);
    ResourceDeployer.addQueue(OUTPUT_QUEUE);
    ResourceDeployer.addQueue(OUTPUT_PROP_QUEUE);
    ResourceDeployer.addQueue(OUTPUT_PHYSICAL_NAME_QUEUE + "_physical", OUTPUT_PHYSICAL_NAME_QUEUE + "_jndi");
    
    URL testConfigUrl = Classes.getResource(TEST_CONFIG);
    URL camelRouteUrl = Classes.getResource(CAMEL_ROUTE);
    URL jndiProperties = Classes.getResource(JNDI_PROPERTIES);
    URL destJndiProperties = Classes.getResource(DEST_JNDI_PROPERTIES);
    String beansXml = Descriptors.create(BeansDescriptor.class).exportAsString();
    return ShrinkWrap.create(JavaArchive.class, "switchyard-JCAJMSReferenceBindingTest.jar")
                     .addClass(JCAJMSTransactionService.class)
                     .addClass(JCAJMSTransactionServiceImpl.class)
                     .addClass(JCAJMSReference.class)
                     .addClass(JCAJMSReferenceText.class)
                     .addClass(JCAJMSReferencePhysicalName.class)
                     .addClass(JCAJMSReferenceService.class)
                     .addClass(JCAJMSReferenceServiceImpl.class)
                     .addClass(JCAJMSFault.class)
                     .addClass(MyJMSContextMapper.class)
                     .addClass(MyJMSMessageComposer.class)
                     .addAsManifestResource(new UrlAsset(testConfigUrl), "switchyard.xml")
                     .addAsManifestResource(new StringAsset(beansXml), "beans.xml")
                     .addAsResource(new UrlAsset(jndiProperties), "jndi.properties")
                     .addAsResource(new UrlAsset(destJndiProperties), "destination-jndi.properties")
                     .addAsResource(new UrlAsset(camelRouteUrl), "camel-route.xml");
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:31,代码来源:JCAJMSReferenceBindingTest.java


示例6: createDeployment

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment(order = 2)
public static JavaArchive createDeployment() throws Exception {
    URL testConfigUrl = Classes.getResource(TEST_CONFIG);
    URL deploymentStructureUrl = Classes.getResource(DEPLOYMENT_STRUCTURE);
    String beansXml = Descriptors.create(BeansDescriptor.class).exportAsString();
    return ShrinkWrap.create(JavaArchive.class, APP_NAME)
                     .addClass(MyStreamableRecordCCIEndpoint.class)
                     .addClass(JCACCIStreamReference.class)
                     .addClass(JCACCIStreamReferenceService.class)
                     .addClass(JCACCIStreamReferenceServiceImpl.class)
                     .addAsManifestResource(new UrlAsset(deploymentStructureUrl), "jboss-deployment-structure.xml")
                     .addAsManifestResource(new UrlAsset(testConfigUrl), "switchyard.xml")
                     .addAsManifestResource(new StringAsset(beansXml), "beans.xml");
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:15,代码来源:JCACCIStreamReferenceBindingTest.java


示例7: createJar

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * Build a jar archive to deploy for arquillian test.
 * @param classToTest the class to test.
 * @return the archive to deploy.
 */
public static JavaArchive createJar(final Class<?> classToTest) {
    final BeansDescriptor beans = Descriptors.create(BeansDescriptor.class).getOrCreateInterceptors()
            .clazz(LogCallbackInterceptor.class.getName()).up().getOrCreateDecorators().clazz(EntityDaoDecoratorWeld.class.getName()).up();

    final JavaArchive arch = ArquillianUtil
            .createTestDependenciesJar(classToTest, beans, BromoServiceArquillianRoot.class.getPackage(),
                                       ServiceArquillianUtil.class.getPackage())
                                       .addAsManifestResource("jboss/test-persistence.xml", "persistence.xml");

    arch.deletePackages(true, CdiEntityManagerProducer.class.getPackage());
    return arch;

}
 
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:19,代码来源:ServiceArquillianUtil.java


示例8: createTestArchive

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * Built an archive to deploy.
 * @return the archive to deploy.
 */
@Deployment
public static Archive<?> createTestArchive() {
    final BeansDescriptor beans = Descriptors.create(BeansDescriptor.class).getOrCreateInterceptors()
            .clazz(LogCallbackInterceptor.class.getName()).up();
    final WebArchive war = CommonArquillianUtil.createWar(LogCallbackInterceptorIT.class, beans);
    war.addAsResource(LOG_DEFAULT);
    war.addAsResource(LOG_INFO);
    war.addAsResource(LOG_DEBUG);
    war.addAsResource(LOG_TRACE);
    war.deleteClass(LogCallbackInterceptorTest.class);
    war.deletePackage(DeltaSpikeCdiContainer.class.getPackage());
    return war;
}
 
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:18,代码来源:LogCallbackInterceptorIT.java


示例9: createWar

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * Creates a new web archive of the specified type. The archive will be be backed by the default.
 * @param classToTest the class to test.
 * @param beans the beans descriptor.
 * @param packageToLoad the package to load into the archive.
 * @return the archive to deploy.
 */
public static WebArchive createWar(final Class<?> classToTest, final BeansDescriptor beans, final Package... packageToLoad) {
    final WebArchive arch = createWar(classToTest);
    loadRuntimeAndTestDependencies(arch);
    //        arch.addAsLibraries(createJar(classToTest, packageToLoad));
    arch.addPackages(true, packageToLoad).deleteClass(TransactionalInterceptor.class);
    setBeansDescriptor(beans, arch);
    return arch;
}
 
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:16,代码来源:ArquillianUtil.java


示例10: setBeansDescriptor

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * Set beans.xml file into archive.
 * @param beans the beans to set. if null, set an empty file.
 * @param arch the archive to set file.
 */
private static void setBeansDescriptor(final BeansDescriptor beans, final JavaArchive arch) {
    if (beans == null) {
        arch.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    } else {
        arch.addAsManifestResource(new StringAsset(beans.exportAsString()), "beans.xml");
    }
}
 
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:13,代码来源:ArquillianUtil.java


示例11: createJar

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * Build a jar archive to deploy for arquillian test.
 * @param classToTest the class to test.
 * @return the archive to deploy.
 */
public static JavaArchive createJar(final Class<?> classToTest) {
    final BeansDescriptor beans = Descriptors.create(BeansDescriptor.class).getOrCreateInterceptors()
            .clazz(LogCallbackInterceptor.class.getName()).up().getOrCreateDecorators().clazz(EntityDaoDecoratorWeld.class.getName()).up();

    final JavaArchive arch = ArquillianUtil
            .createTestDependenciesJar(classToTest, beans, BromoDaoArquillianRoot.class.getPackage(), DaoArquillianUtil.class.getPackage())
            .addAsManifestResource("jboss/test-persistence.xml", "persistence.xml");

    arch.deletePackages(true, CdiEntityManagerProducer.class.getPackage());
    return arch;

}
 
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:18,代码来源:DaoArquillianUtil.java


示例12: createTestArchive

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment
public static Archive<?> createTestArchive() {
    String beansDescriptor = Descriptors.create(BeansDescriptor.class).exportAsString();
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "myarchive.jar")
            .addClasses(QuestionnaireResource.class, ResourceProducer.class, GazpachoResource.class)
            .addAsResource("resources/messages.properties")
            .addAsManifestResource(new StringAsset(beansDescriptor), "beans.xml");
    return archive;
}
 
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:10,代码来源:QuestionnairResourceTest.java


示例13: createTestArchive

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment
public static Archive<?> createTestArchive() {

    String beansDescriptor = Descriptors.create(BeansDescriptor.class).exportAsString();
    return ShrinkWrap
            .create(WebArchive.class, "test.war")
            .addClasses(ResourceProducer.class, GazpachoResource.class, QuestionnaireResource.class,
                    QuestionnairResourceTestServlet.class)
            .addAsWebInfResource(new StringAsset(beansDescriptor), "beans.xml");
}
 
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:11,代码来源:QuestionnairResourceInServletTest.java


示例14: createTestArchive

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment
public static Archive<?> createTestArchive() {
    String beansDescriptor = Descriptors.create(BeansDescriptor.class).exportAsString();

    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "myarchive.jar").addClasses(MessageBundle.class)
            .addClasses(MessageBundleImpl.class).addClasses(MessageResource.class)
            .addClasses(MessageResourceProducer.class)

            .addAsResource("resources/messages.properties")
            .addAsManifestResource(new StringAsset(beansDescriptor), "beans.xml");

    return archive;
}
 
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:14,代码来源:MessageResourceTest.java


示例15: war

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment(testable = false)
@ShouldThrowException(javax.enterprise.inject.spi.DeploymentException.class)
public static WebArchive war() {
    return ShrinkWrap.create(WebArchive.class)
            .addAsWebInfResource(new StringAsset(Descriptors.create(BeansDescriptor.class)
                    .getOrCreateInterceptors()
                        .clazz("i.dont.exist.so.i.ll.make.the.deployment.fail")
                    .up()
                    .exportAsString()), ArchivePaths.create("beans.xml"));
}
 
开发者ID:apache,项目名称:tomee,代码行数:11,代码来源:ExceptionInjectionTest.java


示例16: war

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
@Deployment(testable = false)
@ShouldThrowException(OpenEJBRuntimeException.class)
public static WebArchive war() {
    return ShrinkWrap.create(WebArchive.class, "DeploymentExceptionErrorTest.war")
                .addAsWebInfResource(new StringAsset(Descriptors.create(BeansDescriptor.class)
                        .getOrCreateInterceptors()
                            .clazz("i.dont.exist.so.i.ll.make.the.deployment.fail")
                        .up()
                        .exportAsString()), ArchivePaths.create("beans.xml"));
}
 
开发者ID:apache,项目名称:tomee,代码行数:11,代码来源:DeploymentExceptionErrorTest.java


示例17: addDefaultNamespaces

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * Adds the default namespaces as defined in the specification 
 * @return the current instance of <code>BeansDescriptor</code> 
 */
public BeansDescriptor addDefaultNamespaces()
{
   addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
   addNamespace("xsi:schemaLocation", "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd");
   addNamespace("xmlns", "http://java.sun.com/xml/ns/javaee");
  return this;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:12,代码来源:BeansDescriptorImpl.java


示例18: getOrCreateInterceptors

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * If not already created, a new <code>interceptors</code> element with the given value will be created.
 * Otherwise, the existing <code>interceptors</code> element will be returned.
 * @return  a new or existing instance of <code>Interceptors<BeansDescriptor></code> 
 */
public Interceptors<BeansDescriptor> getOrCreateInterceptors()
{
   Node node = model.getOrCreate("interceptors");
   Interceptors<BeansDescriptor> interceptors = new InterceptorsImpl<BeansDescriptor>(this, "interceptors", model, node);
   return interceptors;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:12,代码来源:BeansDescriptorImpl.java


示例19: getOrCreateDecorators

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * If not already created, a new <code>decorators</code> element with the given value will be created.
 * Otherwise, the existing <code>decorators</code> element will be returned.
 * @return  a new or existing instance of <code>Decorators<BeansDescriptor></code> 
 */
public Decorators<BeansDescriptor> getOrCreateDecorators()
{
   Node node = model.getOrCreate("decorators");
   Decorators<BeansDescriptor> decorators = new DecoratorsImpl<BeansDescriptor>(this, "decorators", model, node);
   return decorators;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:12,代码来源:BeansDescriptorImpl.java


示例20: getOrCreateAlternatives

import org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor; //导入依赖的package包/类
/**
 * If not already created, a new <code>alternatives</code> element with the given value will be created.
 * Otherwise, the existing <code>alternatives</code> element will be returned.
 * @return  a new or existing instance of <code>Alternatives<BeansDescriptor></code> 
 */
public Alternatives<BeansDescriptor> getOrCreateAlternatives()
{
   Node node = model.getOrCreate("alternatives");
   Alternatives<BeansDescriptor> alternatives = new AlternativesImpl<BeansDescriptor>(this, "alternatives", model, node);
   return alternatives;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:12,代码来源:BeansDescriptorImpl.java



注:本文中的org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TopicExistsException类代码示例发布时间:2022-05-23
下一篇:
Java OnStopEvent类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap