[Design of JBossXB] - SchemaResolverDeployer and JBossXB
by jesper.pedersen
So I'm trying to minimize the work I have to do inside my deployer chain by using the SchemaResolver as the base class.
But I keep getting
| Caused by: java.lang.Exception: The xml ra15inoutjbossra.rar/META-INF/ra.xml is not well formed!
| at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:191)
| at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)
| at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)
| at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)
| at org.jboss.jca.deployers.rar.RaXmlParsingDeployer.parse(RaXmlParsingDeployer.java:75)
| at org.jboss.jca.deployers.rar.RaXmlParsingDeployer.parse(RaXmlParsingDeployer.java:39)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
|
for my deployments even though the XML files are well-formed.
Is there a test case or wiki page that describes how you would go about using this stuff ?
I basically just need to get from the VirtualFile to the object that defines the metadata located in JBMETA.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230178#4230178
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230178
16 years, 11 months
[Design of JBoss ESB] - Re: JmsConnectionPool: Allowing control over the number of S
by Kevin.Conner@jboss.com
It is probably best to go down the first suggestion.
One issue is that we are currently closing down sessions that are deemed unreliable. One example of this is an issue which is evident with JBoss Messaging, ironically using XASessions, where the XAResource appears to get into an inconsistent state and is, after that point, unusable. We have no real choice but to attempt to close down the session and create a new one, currently from the same connection.
In addition we need to track the connection/session association as any errors returned through the listener will force a closure of the connection and sessions, with sessions returning to the pool later being discarded rather than reused, and we will need to handle this without affecting the other sessions/connections in this pool.
It would also be a good idea to consider separating the XA/non-XA connections resources in case a provider enforces different limits per type, such as in the error you are trying to reproduce.
Kev
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230169#4230169
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230169
16 years, 11 months
[Design the new POJO MicroContainer] - DESCRIBE phase - Dependency builders for MC Beans
by jaikiran
While looking into the deployment timings issues, i noticed that any MC bean that gets deployed spends (relatively) considerable amount of time during the DESCRIBE phase. A bit of debugging reveals that the DescribeAction relies on a dependency builder which is configured at the kernel level:
| org.jboss.kernel.plugins.dependency.DescribeAction:
|
| DependencyBuilder dependencyBuilder = config.getDependencyBuilder();
| KernelMetaDataRepository repository = controller.getKernel().getMetaDataRepository();
| MetaData md = repository.getMetaData(context);
| // add custom dependencies (e.g. AOP layer).
| List<DependencyBuilderListItem> dependencies = dependencyBuilder.getDependencies(info, md);
|
By *default* the dependency builder is set to AOPDependencyBuilder
KernelConstants:
| static final String DEPENDENCY_BUILDER_DEFAULT="org.jboss.aop.microcontainer.integration.AOPDependencyBuilder:org.jboss.kernel.spi.dependency.helpers.AbstractDependencyBuilder";
|
This AOPDependencyBuilder uses an AspectManager to try and apply any AOP bindings to *all* MC beans that get deployed:
| * Finds all managed aspects that apply
| * to the bean and includes their dependencies as dependencies of the bean
| *
| public class AOPDependencyBuilder extends AbstractDependencyBuilder
| {
|
Effectively this dependency builder does AOP stuff by applying bindings defined in litterally every *aop-beans.xml in the server. Aspects/bindings defined in AS/common/lib/jboss-messaging.jar are also picked up. Overall, every MC beans goes through this AOPDependencyBuilder and (expensive) AOP stuff is carried out on these MC beans. But from what i see, most of the MC beans being deployed don't rely about this AOPDependencyBuilder to generate the dependencies. Atleast EJB3 container deployment MC beans don't rely on this. I hacked into this component to ensure that this is not a default dependency builder and was able to boot most of the AS (expect i think the webserver deployment, iirc) without issues, which means that *not* having this as the default dependency builder probably is a better option.
Given the way, this dependency builder is currently picked up (it's picked up from the KernelConfig which corresponds to the Kernel), i found no way of configuring a different dependency builder (which just returns null on the lines of org.jboss.kernel.spi.dependency.helpers.AbstractDependencyBuilder) for the EJB3 MC bean deployments. Changing the default is going to affect other (few) deployments.
1) Can the AOPDependencyBuilder be removed as the default
2) Currently this is a kernel level property. Can this be made per bean/context level property (by default set to org.jboss.kernel.spi.dependency.helpers.AbstractDependencyBuilder) so that each MC bean context can override this if required? Whichever MC beans need this AOPDependencyBuilder currently in the AS can then be switched appropriately.
3) This is not directly related to this issue - But any reason why the configs defined in jar files under AS/common/lib (aop-messaging-client.xml and aop-messaging-server.xml) are being parsed? I did not debug much into this part.
Just to see how much improvement this change, might bring in to (EJB3) deployments, i hacked the AOPDependencyBuilder to skip the AOP stuff for org.jboss.ejb3.* MC deployments. My sample application which was taking 20 seconds to deploy. now takes 15 seconds - still on a higher side but there's a 25% improvement by this one single hack.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230162#4230162
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230162
16 years, 11 months