Package org.jboss.metadata

Examples of org.jboss.metadata.BeanMetaData


/*     */   }
/*     */
/*     */   public void start()
/*     */     throws Exception
/*     */   {
/* 139 */     BeanMetaData metaData = this.container.getBeanMetaData();
/* 140 */     EJBProxyFactoryContainer invokerContainer = (EJBProxyFactoryContainer)this.container;
/*     */
/* 142 */     this.localHomeClass = invokerContainer.getLocalHomeClass();
/* 143 */     this.localClass = invokerContainer.getLocalClass();
/* 144 */     if ((this.localHomeClass == null) || (this.localClass == null))
/*     */     {
/* 146 */       log.debug(metaData.getEjbName() + " cannot be Bound, doesn't " + "have local and local home interfaces");
/*     */
/* 150 */       return;
/*     */     }
/*     */
/* 154 */     Class[] intfs = { this.localClass };
/* 155 */     Class proxyClass = Proxy.getProxyClass(BaseLocalProxyFactory.ClassLoaderAction.UTIL.get(this.localClass), intfs);
/* 156 */     Class[] constructorParams = { InvocationHandler.class };
/*     */
/* 159 */     this.proxyClassConstructor = proxyClass.getConstructor(constructorParams);
/*     */
/* 161 */     Context iniCtx = new InitialContext();
/* 162 */     String beanName = metaData.getEjbName();
/*     */
/* 166 */     this.transactionManager = ((TransactionManager)iniCtx.lookup("java:/TransactionManager"));
/*     */
/* 170 */     Method[] methods = this.localClass.getMethods();
/* 171 */     this.beanMethodInvokerMap = new HashMap();
View Full Code Here


/*     */
/* 148 */     Iterator beans = this.ejbMetaData.getEnterpriseBeans();
/*     */
/* 150 */     while (beans.hasNext())
/*     */     {
/* 152 */       BeanMetaData bean = (BeanMetaData)beans.next();
/*     */
/* 154 */       if (bean.isEntity())
/*     */       {
/* 156 */         EntityMetaData entityBean = (EntityMetaData)bean;
/* 157 */         if ((metaData.isEJB2x()) && (entityBean.isCMP1x()))
/*     */         {
/* 162 */           boolean storedSuccess = this.success;
/*     */
/* 164 */           this.verifier.checkEntity(entityBean);
/*     */
/* 166 */           if (this.success != storedSuccess)
/*     */           {
/* 168 */             log.warn("The CMP 1.x EJB '" + entityBean.getEjbName() + "' generated some verification warnings. The Deployer " + "will ignore these warnings but you should check " + "your EJB to be on the safe side of things.");
/*     */           }
/*     */
/* 174 */           this.success = storedSuccess;
/*     */         }
/*     */         else
/*     */         {
/* 178 */           this.verifier.checkEntity(entityBean);
/*     */         }
/*     */       }
/* 181 */       else if (bean.isSession())
/*     */       {
/* 183 */         this.verifier.checkSession((SessionMetaData)bean);
/*     */       }
/*     */       else
/*     */       {
View Full Code Here

/*    */     {
/* 86 */       Invocation inv = new Invocation(this.timedObjectId.getInstancePk(), this.method, new Object[] { timer }, null, null, null);
/* 87 */       inv.setValue(InvocationKey.INVOKER_PROXY_BINDING, null, PayloadKey.AS_IS);
/* 88 */       inv.setType(InvocationType.LOCAL);
/*    */
/* 90 */       BeanMetaData bmd = this.container.getBeanMetaData();
/* 91 */       SecurityIdentityMetaData ejbTimeoutIdentity = bmd.isEntity() ? null : bmd.getEjbTimeoutIdentity();
/* 92 */       if ((ejbTimeoutIdentity != null) && (!ejbTimeoutIdentity.getUseCallerIdentity()))
/*    */       {
/* 94 */         ApplicationMetaData applicationMetaData = bmd.getApplicationMetaData();
/* 95 */         AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
/* 96 */         String roleName = ejbTimeoutIdentity.getRunAsRoleName();
/* 97 */         String principalName = ejbTimeoutIdentity.getRunAsPrincipalName();
/*    */
/* 99 */         Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
View Full Code Here

/*     */       }
/* 109 */       this.pm = ec.getPersistenceManager();
/* 110 */       ec.setPersistenceManager(this);
/*     */     }
/*     */
/* 114 */     BeanMetaData bmd = this.container.getBeanMetaData();
/* 115 */     ApplicationMetaData appMetaData = bmd.getApplicationMetaData();
/*     */
/* 119 */     for (Iterator iter = bmd.getResourceReferences(); iter.hasNext(); )
/*     */     {
/* 121 */       ResourceRefMetaData resRefMetaData = (ResourceRefMetaData)iter.next();
/* 122 */       String jndiName = resRefMetaData.getJndiName();
/* 123 */       if (jndiName == null)
/*     */       {
View Full Code Here

/*  375 */         contextID = this.deploymentUnit.getSimpleName();
/*      */       }
/*      */
/*  378 */       while (beans.hasNext())
/*      */       {
/*  380 */         BeanMetaData bean = (BeanMetaData)beans.next();
/*  381 */         log.info("Deploying " + bean.getEjbName());
/*  382 */         Container con = createContainer(bean, this.deploymentUnit);
/*  383 */         addContainer(con);
/*      */
/*  385 */         con.setJaccContextID(contextID);
/*      */       }
/*      */
/*  392 */       ListIterator iter = this.containerOrdering.listIterator();
/*  393 */       while (iter.hasNext())
/*      */       {
/*  395 */         Container con = (Container)iter.next();
/*  396 */         ObjectName jmxName = con.getJmxName();
/*      */
/*  400 */         this.server.registerMBean(con, jmxName);
/*      */
/*  402 */         BeanMetaData metaData = con.getBeanMetaData();
/*  403 */         Collection depends = new ArrayList();
/*  404 */         for (String dependsName : metaData.getDepends())
/*      */         {
/*  406 */           depends.add(ObjectName.getInstance(dependsName));
/*      */         }
/*  408 */         this.serviceController.create(jmxName, depends);
/*      */
View Full Code Here

/*  498 */       Container con = (Container)iter.previous();
/*      */       try
/*      */       {
/*  501 */         ObjectName jmxName = con.getJmxName();
/*      */
/*  503 */         BeanMetaData metaData = con.getBeanMetaData();
/*  504 */         String ejbName = metaData != null ? metaData.getEjbName() : "Unknown";
/*  505 */         log.debug("stopService, stopping container: " + ejbName);
/*      */
/*  507 */         this.serviceController.stop(jmxName);
/*      */       }
/*      */       catch (Exception e)
View Full Code Here

/*     */   public void setContainer(Container container)
/*     */   {
/*  60 */     super.setContainer(container);
/*  61 */     if (container != null)
/*     */     {
/*  63 */       BeanMetaData beanMetaData = container.getBeanMetaData();
/*  64 */       ApplicationMetaData applicationMetaData = beanMetaData.getApplicationMetaData();
/*  65 */       AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
/*  66 */       this.securityRoles = assemblyDescriptor.getSecurityRoles();
/*     */
/*  68 */       this.realmMapping = container.getRealmMapping();
/*     */     }
View Full Code Here

/*     */   public void setContainer(Container container)
/*     */   {
/*  65 */     super.setContainer(container);
/*  66 */     if (container != null)
/*     */     {
/*  68 */       BeanMetaData beanMetaData = container.getBeanMetaData();
/*  69 */       ApplicationMetaData application = beanMetaData.getApplicationMetaData();
/*  70 */       AssemblyDescriptorMetaData assemblyDescriptor = application.getAssemblyDescriptor();
/*     */
/*  72 */       SecurityIdentityMetaData secMetaData = beanMetaData.getSecurityIdentityMetaData();
/*  73 */       if ((secMetaData != null) && (!secMetaData.getUseCallerIdentity()))
/*     */       {
/*  75 */         String roleName = secMetaData.getRunAsRoleName();
/*  76 */         String principalName = secMetaData.getRunAsPrincipalName();
/*  77 */         if (principalName == null) {
View Full Code Here

/* 273 */     this.inMethodStack.clear();
/*     */   }
/*     */
/*     */   protected boolean isContainerManagedTx()
/*     */   {
/* 282 */     BeanMetaData md = this.con.getBeanMetaData();
/* 283 */     return md.isContainerManagedTx();
/*     */   }
View Full Code Here

/* 283 */     return md.isContainerManagedTx();
/*     */   }
/*     */
/*     */   protected boolean isUserManagedTx()
/*     */   {
/* 288 */     BeanMetaData md = this.con.getBeanMetaData();
/* 289 */     return !md.isContainerManagedTx();
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.BeanMetaData

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.