[Design the new POJO MicroContainer] - Why is kernel looking for default constructor?
by richard.opalka@jboss.com
I don't know what I'm doing wrong :(
Could somebody help me with an idea what I might be doing wrong, please?
I've got the following deployer:
| package org.jboss.wsf.container.jboss50.deployer;
|
| import java.util.Set;
|
| import org.jboss.deployers.spi.DeploymentException;
| import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
| import org.jboss.deployers.structure.spi.DeploymentUnit;
| import org.jboss.metadata.web.jboss.JBossWebMetaData;
| import org.jboss.wsf.spi.deployment.Deployment;
| import org.jboss.wsf.spi.deployment.DeploymentAspect;
| import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
|
| public class WSDeploymentAspectDeployer extends AbstractRealDeployer
| {
|
| private final DeploymentAspect aspect;
|
| /**
| * Constructor.
| */
| public WSDeploymentAspectDeployer( DeploymentAspect aspect )
| {
| super();
|
| this.aspect = aspect;
|
| // inputs
| // ...
| // outputs
| // ...
| }
|
| @Override
| public void internalDeploy(DeploymentUnit unit) throws DeploymentException
| {
| // the deploy staff
| }
|
| @Override
| public void internalUndeploy(DeploymentUnit unit)
| {
| // the undeploy staff
| }
| }
|
|
I've got the following configuration:
| ...
| <bean
| name="WSContainerMetaDataDeploymentAspect"
| class="org.jboss.wsf.container.jboss50.deployment.metadata.ContainerMetaDataDeploymentAspect">
| </bean>
|
| <bean name="WSContainerMetaDataDeployer" class="org.jboss.wsf.container.jboss50.deployer.WSDeploymentAspectDeployer">
| <constructor>
| <parameter class="org.jboss.wsf.spi.deployment.DeploymentAspect">
| <inject bean="WSContainerMetaDataDeploymentAspect"/>
| </parameter>
| </constructor>
| </bean>
| ...
|
And I'm getting the following exception (kernel tries to lookup public default constructor I don't provide):
| 15:59:53,815 ERROR [AbstractKernelController] Error installing to Instantiated: name=WSDeploymentAspectsDeployer state=Described
| org.jboss.joinpoint.spi.JoinpointException: Constructor not found org.jboss.wsf.container.jboss50.deployer.WSDeploymentAspectDeployer[] in [ReflectConstructorInfoImpl@74247cc2{[ReflectClassInfoImpl(a)77ae020{name=org.jboss.wsf.spi.deployment.DeploymentAspect}]}]
| at org.jboss.joinpoint.plugins.Config.findConstructorInfo(Config.java:275)
| at org.jboss.kernel.plugins.config.Configurator.resolveConstructor(Configurator.java:290)
| at org.jboss.kernel.plugins.config.Configurator.findConstructor(Configurator.java:256)
| at org.jboss.kernel.plugins.config.Configurator.getConstructorJoinPoint(Configurator.java:213)
| at org.jboss.kernel.plugins.config.AbstractKernelConfigurator.getConstructorJoinPoint(AbstractKernelConfigurator.java:137)
| at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:61)
| at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
| at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
| at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
| at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
| at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
| at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
| at org.jboss.Main.boot(Main.java:221)
| at org.jboss.Main$1.run(Main.java:556)
| at java.lang.Thread.run(Thread.java:595)
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241209#4241209
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241209
14 years, 10 months
[Design the new POJO MicroContainer] - Re: ClassPool for JBoss Reflection
by flavia.rainone@jboss.com
"kabir.khan(a)jboss.com" wrote : "flavia.rainone(a)jboss.com" wrote :
| | *** I mean, when you do toClass, the class is already in the cache by now. Plus, what if somebody is doing a toClass with a class that is in the softcache? The lockInCache call will force the class being added as a hard reference to the "classes" cache, thus ruining the soften feature.
|
| I'm not really sure what you mean here, but toClass() is called when creating a new class so does that not need to be in the hard cache? If only in the softcache, when it is removed and somebody needs to obtain the CtClass again we would need to load it from its resource. Although in AS that would probably be fine since dynamically created classes have their bytes written to a temporary location (tempURL in AS 4, vfsmemory url in AS 5)
The lockInCache method forces the class to be added to the classes cache, which is hard reference based. But, if you add a class that was in the softcache to the classes cache, the softcache is useless for this class... it is in the softcache but it won't be gc'ed.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241205#4241205
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241205
14 years, 10 months
[Design of JBoss ESB] - Re: Supporting entry-point
by beve
Regarding the startTimestamp and using the ESB Message dob (entry time).
This can be done by declaring the Message as an event:
| import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl
|
| declare MessageImpl
| @role( event )
| @timestamp( properties.getProperty("org.jboss.soa.esb.message.time.dob") )
| end
|
Notice that we are specifying the concrete implementation and not the interface Message. I've not been able to get this to work by specifying the Message interface but will try to find out if that is possible.
Users can use the same approach as above to set the startTimeStamp. This can be done by setting a property on the ESB Message object and use that property name instead of "org.jboss.soa.esb.message.time.dob" above.
To find out the value of the Events startTimestamp we've added a log statement at debug level:
| Event :org.jboss.internal.soa.esb.message.format.serialized.MessageImpl, startTimeStamp: 1246454582714
|
Any thoughts on this?
Thanks,
/Daniel
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241201#4241201
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241201
14 years, 10 months