[Design of EJB 3.0] - Depends metadata ignored if no xml file present
by bstansberry@jboss.com
Been working on adding dependencies on the specified HAPartition for clustered EJB2/3 beans (https://jira.jboss.org/jira/browse/JBAS-4952 ) and am seeing an issue with EJB3.
The way I'm doing this is with a deployer that add an item to the JBossEnterpriseBeanMetaData.getDepends() set for clustered beans. This works fine for EJB2 beans and for EJB3 jars with an xml descriptor. But it doesn't work if there is no xml descriptor.
I tracked the issue down to this in Ejb3Deployment:
| protected void deployElement(Ejb3HandlerFactory factory, ClassFile cf, InitialContext ctx) throws Exception
| {
| Ejb3Handler handler = factory.createHandler(cf);
| handler.setCtxProperties(unit.getJndiProperties());
|
| if (handler.isEjb() || handler.isJBossBeanType())
| {
| List<Container> containers = handler.getContainers(cf, this);
|
The handler.getContainers() call is what results in various metadata being converted into annotations on the container, including the conversion of JBossEnterpriseBeanMetaData.getDepends() into @Depends. The annotations are what ultimately drive the creation of MC dependencies.
The problem is if there's no xml the "if (handler.isEjb() || handler.isJBossBeanType())" test returns false, and the whole thing is short-circuited.
Besides impacting my particular task, I wonder if this is a general problem -- other types of metadata that deployers might add won't make it onto the annotations that drive actual behavior.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173223#4173223
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173223
16 years
[Design of Messaging on JBoss (Messaging/JBoss)] - runServer is broken on trunk...
by clebert.suconic@jboss.com
As part of my merge and work on paging on trunk, I'm trying to run the server, perfSender.. etc.
ant runServer is broken:
runServer:
| [java] 15:34:48,145 ERROR @main [AbstractKernelController] Error installing to Configured: name=Main state=Instantiated
| [java] java.lang.IllegalArgumentException: No such property host for bean org.jboss.messaging.core.config.impl.FileConfiguration available [journalSyncTransactional, packetConfirmationBatchSize, bindingsDirectory, requireDestinations, interceptorClassNames, journalMinFiles, createJournalDir, createBindingsDir, class, securityEnabled, journalFileSize, journalType, securityInvalidationInterval, journalMaxAIO, configurationUrl, connectionScanPeriod, pagingDirectory, callTimeout, backup, scheduledThreadPoolMaxSize, acceptorInfos, journalSyncNonTransactional, JMXManagementEnabled, journalDirectory, clustered]
| [java] at org.jboss.beans.info.plugins.AbstractBeanInfo.getProperty(AbstractBeanInfo.java:160)
| [java] at org.jboss.beans.info.plugins.AbstractBeanInfo.getProperty(AbstractBeanInfo.java:237)
| [java] at org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext.get(AbstractKernelControllerContext.java:226)
| [java] at org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData.getValue(AbstractDependencyValueMetaData.java:171)
|
|
I had to add the property host on ConfigurationImpl to make the server start.
After I made it start, but then perfSender/perfListener is not working. The JNDI is refusing the connection:
| [java] at org.jboss.jms.example.PerfExample.runSender(PerfExample.java:128)
| [java] at org.jboss.jms.example.PerfExample.main(PerfExample.java:102)
| [java] Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
| [java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:276)
| [java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1572)
| [java] ... 6 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173182#4173182
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173182
16 years