[Design of JBossXB] - Re: Marshalling an AbstractKernelDeployment
by flavia.rainone@jboss.com
Alex,
I'm now using the SchemaBinding as you suggested:
SchemaBinding binding = JBossXBBuilder.build(AbstractKernelDeployment.class);
| marshaller.marshal(binding, null, deployment, writer);
It still looks like I'm missing something:
Exception in thread "main" org.jboss.xb.binding.JBossXBRuntimeException: Failed to marshal wildcard: neither class mapping was found for class org.jboss.kernel.plugins.deployment.AbstractKernelDeployment@19267322 (toString: AbstractKernelDeployment@125fefa{name=null installed=false beanFactories=[AbstractBeanMetaData@186df0f{name=test bean=org.jboss.microcontainer.tools.Test properties= constructor=null autowireCandidate=true}]}) nor marshaller for unresolved classes was setup.
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalWildcard(MarshallerImpl.java:833)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalWildcardOccurence(MarshallerImpl.java:792)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:745)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroupSequence(MarshallerImpl.java:970)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroup(MarshallerImpl.java:910)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:656)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroupSequence(MarshallerImpl.java:970)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroup(MarshallerImpl.java:910)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:656)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalComplexType(MarshallerImpl.java:619)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementType(MarshallerImpl.java:430)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElement(MarshallerImpl.java:329)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementOccurence(MarshallerImpl.java:309)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshallInternal(MarshallerImpl.java:215)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshal(MarshallerImpl.java:157)
| at org.jboss.microcontainer.tools.Test.main(Test.java:79)
|
Any thoughts?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234186#4234186
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234186
15 years, 4 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: I got failure in queue-message-redistribution
by jmesnil
in order to understand the problem, here is what happening when the example pass (i.e. server1/data
contains bindings and logs from a previous run):
- a consumer is created on server0
=> server1 is notified the consumer is created
- on server1, the queue has no local consumers but 5 message references
=> a redistributor is created
However, there shouldn't be 5 messages references in the queue! They come from the
previous run where a NPE occurs and there remains 5 messages in the queue.
To sum up, the example will always fail the 1st time and this failure will make the example
succeeds unless the server1/data is cleaned up.
Now, the example will systematically fail.
What I'm expecting is that a redistributor must be added to server1 when it is notified
that *its own consumer is closed*, there should be 5 messages references in the queue
(since they were not acked by the consumer) but there is none. I'm investigating why it is so.
To prevent that, I'll make the example use non persistent messages so that they won't be
any messages from a previous run.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234156#4234156
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234156
15 years, 4 months
[Design of Management Features on JBoss] - Re: How to Expose MBean Invocation Stats into admin-console?
by ALRubinger
Using my patch from the previous post, and jboss-deployers:2.2.0-SNAPSHOT, I no longer need to addOutput to the DeploymentUnit.
But the results are weird:
ManagedDeployment: vfszip:/home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x/build/output/jboss-5.2.0.Beta/server/default/deploy/stateless-test.jar/
| +++ ManagedComponent(name=org.jboss.ejb3.metrics.deployer.ManagedInvocationStatisticsWrapper, type=(ComponentType{type=MCBean, subtype=*}), compName=jboss.j2ee:service=EJB3,name=RunAsStatelessEjbName-metrics-invocation, attachment: org.jboss.ejb3.metrics.deployer.ManagedInvocationStatisticsWrapper
| ++++++ properties: [stats]
| +++ ManagedComponent(name=org.jboss.ejb3.metrics.deployer.BasicStatelessSessionInstanceMetrics, type=(ComponentType{type=MCBean, subtype=*}), compName=jboss.j2ee:service=EJB3,name=AnonymousStatelessBean-metrics-instance, attachment: org.jboss.ejb3.metrics.deployer.BasicStatelessSessionInstanceMetrics
| ++++++ properties: [removeCount, currentSize, maxSize, createCount, availableCount]
|
I get "metrics-invocation" for "RunAsStatelessEjbName" and "metrics-instance" for "AnonymousStatelessBean". I should be getting both invocation and instance metrics for each (as log output from my deployer confirms). And I'm missing some other EJBs entirely:
09:32:27,330 INFO [Ejb3MetricsDeployer] Invocation stats for :jboss.j2ee:service=EJB3,name=AnonymousStatelessBean-metrics-invocation
| 09:32:27,330 INFO [Ejb3MetricsDeployer] Metrics stats for :jboss.j2ee:service=EJB3,name=AnonymousStatelessBean-metrics-instance
| 09:32:27,330 INFO [Ejb3MetricsDeployer] Invocation stats for :jboss.j2ee:service=EJB3,name=CheckedStatelessBean-metrics-invocation
| 09:32:27,330 INFO [Ejb3MetricsDeployer] Metrics stats for :jboss.j2ee:service=EJB3,name=CheckedStatelessBean-metrics-instance
| 09:32:27,330 INFO [Ejb3MetricsDeployer] Invocation stats for :jboss.j2ee:service=EJB3,name=DefaultPoolStatelessBean-metrics-invocation
| 09:32:27,359 INFO [Ejb3MetricsDeployer] Metrics stats for :jboss.j2ee:service=EJB3,name=DefaultPoolStatelessBean-metrics-instance
| 09:32:27,359 INFO [Ejb3MetricsDeployer] Invocation stats for :jboss.j2ee:service=EJB3,name=RunAsStatelessEjbName-metrics-invocation
| 09:32:27,359 INFO [Ejb3MetricsDeployer] Metrics stats for :jboss.j2ee:service=EJB3,name=RunAsStatelessEjbName-metrics-instance
| 09:32:27,359 INFO [Ejb3MetricsDeployer] Invocation stats for :jboss.j2ee:service=EJB3,name=StrictMaxPoolStatelessBean-metrics-invocation
| 09:32:27,360 INFO [Ejb3MetricsDeployer] Metrics stats for :jboss.j2ee:service=EJB3,name=StrictMaxPoolStatelessBean-metrics-instance
| 09:32:27,360 INFO [Ejb3MetricsDeployer] Invocation stats for :jboss.j2ee:service=EJB3,name=UnsecuredStatelessBean-metrics-invocation
| 09:32:27,360 INFO [Ejb3MetricsDeployer] Metrics stats for :jboss.j2ee:service=EJB3,name=UnsecuredStatelessBean-metrics-instance
|
S,
ALR
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234150#4234150
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234150
15 years, 4 months
[Design of Management Features on JBoss] - Re: How to Expose MBean Invocation Stats into admin-console?
by ALRubinger
The logic is odd to me:
* Loop through all outputs from all deployers
* If that output has a corresponding attachment, make a managed object out of it.
Why not just:
[alrubinger@localhost 2.0.7.GA]$ svn di deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/DefaultManagedObjectCreator.java
| Index: deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/DefaultManagedObjectCreator.java
| ===================================================================
| --- deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/DefaultManagedObjectCreator.java (revision 89514)
| +++ deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/DefaultManagedObjectCreator.java (working copy)
| @@ -21,6 +21,7 @@
| */
| package org.jboss.deployers.spi.deployer.helpers;
|
| +import java.util.Collection;
| import java.util.Map;
| import java.util.Set;
|
| @@ -73,12 +74,14 @@
| if(factory == null )
| factory = ManagedObjectFactoryBuilder.create();
|
| - for(String name : attachments)
| + final Map<String,Object> duAttachments = unit.getAttachments();
| + final Collection<String> attachmentNames = duAttachments.keySet();
| + for(final String attachmentName:attachmentNames)
| {
| - Object instance = unit.getAttachment(name);
| + Object instance = unit.getAttachment(attachmentName);
| if (instance != null)
| {
| - ManagedObject mo = factory.initManagedObject(instance, null, metaData, name, null);
| + ManagedObject mo = factory.initManagedObject(instance, null, metaData, attachmentName, null);
| if (mo != null)
| managedObjects.put(mo.getName(), mo);
| }
S,
ALR
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234138#4234138
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234138
15 years, 4 months