[JBoss ESB Development] - Stateful Aggregator in cluster + Sequences with end terminat
by sirocchj
Hi all,
I am writing this as I recently faced the two issues mentioned in the subject, when implementing a bunch of services on a clustered (2 nodes) esb:
1. clustering of stateful services is not supported in current codebase
2. aggregation info (I mean AggregationDetails.java) is only designed for sequences with predetermined size, like: 1/N, 2/N, ... N/N (i.e. no support for sequences like: 1/false, 2/false, ... N/true where the boolean flags indicate whether the sequence has ended or not, as per EIP)
I indeed came up with a working solution which involves:
1. Using JBossCache as a means for replicating all the aggregation bits across all nodes that form a cluster (my current solution uses 3.2.1.GA aka "Malagueta" with MVCC locking, REPL_SYNC cache mode, READ_COMMITTED isolation, UDP JGroups stack underneath, a shared CacheLoader for persisting all cache entries, manual eviction of complete nodes, etc; but I am also planning to try several other things, such as REPL_ASYNC and/or INVALIDATION_ASYNC and make use of the org.jboss.cache.notifications.annotation.* annotations, eviction policies,... at some stage I must also get my head around Infinispan ;-) )
2. Enhancing AggregationDetails to support also these kind of sequences (I was splitting a CSV file using Smooks and had no knowledge nor wanted to know *beforehand* the number of lines in the original file)
If you are at all interested I am more than willing to share, code is not perfect but works quite well ;-)
Regards
\j
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265410#4265410
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265410
16 years, 4 months
[Management Development] - Re: Simple Example using ManagedObjects and ProfileService
by emuckenhuber
"rareddy" wrote :
| When I execute this, I always end up in NPE on the response. I see the metadata on the object like its operations and properties etc, but not seemed to access the property values or invoke operations. I think I may be missing some step, can somebody please help or point toward a example?
|
With NPE on the response - you mean that the invocation returns null?
In general you would need to set the "runtime" property in the @ManagementObject annotation to "true". ProfileService should then dispatch the invocation to the correct bean.
I assume you are using MC or JMX to deploy your test bean?
"rareddy" wrote :
| I looked in "admin-console" code, but I did not see any difference from above.
|
Hmm, the admin-console needs additional metadata descriptors (some mapping between jopr and profileservice) to display the exposed information from ProfileService.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265354#4265354
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265354
16 years, 4 months
[JBoss Microcontainer Development] - Re: Testing Deployers with new Reflect + ClassPool
by flavia.rainone@jboss.com
"flavia.rainone(a)jboss.com" wrote : (...)I guess I'll create a JBossClDelegatingCPRepository (BTW, maybe we should refactor those names?
On a separate note, as it is today, the jboss-classpool project contains several legacy classpools, that were useful for previous classloader models.
I've kept those intact because the plan is to port the refactoring I've done on JBoss AOP (JBAOP-742) to JBoss AOP's trunk. For that, I would like to have Kabir's validation on JBAOP-742 refactoring and on the removal of some classpools. IMO the only classpool we should keep, besides JBossClDelegatingCP, is the unified class loader compatible (plus some helper CPs, such as Temp CPs). The other classpools, such as JBoss5ClassPool, are never used and I I think they could be removed. That would greatly simplify jboss-classpool project. And, on a next level, once this code cleanup is complete, I wonder if we can find a shorter name for JBossClDelegatingCP and a simpler CP hierarchy for it.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265325#4265325
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265325
16 years, 4 months
[JBoss Microcontainer Development] - Re: Testing Deployers with new Reflect + ClassPool
by flavia.rainone@jboss.com
"alesj" wrote : But you should make it in such way that you can do proper cleanup with Module only.
|
| e.g.
| With register code you create hierarchy with Module's help, but also apply proper CL mappings.
| Where you somehow tie those CL mappings with Module.
| (perhaps a simple WeakHashMap by CL key is enough here)
| But the real cleanup code is done by Module mapping.
|
Those CL mappings are already tied with Module. What I currently lack is a map from Modules to ClassPools. I guess I'll create a JBossClDelegatingCPRepository (BTW, maybe we should refactor those names?) and add a unregister(ClassLoader, Module) like the one below:
public void unregisterClassLoader(ClassLoader classLoader, Module module){
| ClassPool classPool = registeredModules.remove(module); // remove from the newly created map module->classpool
| if (classLoader == null)
| classPool.close(); // perform CP cleanup
| else
| this.unregisterClassLoader(classLoader); // needs to call the original unregister module so
| // that the registeredCLs mapping is cleaned up as well; this method also invokes classPool.close()
| // and this should not be done twice
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265322#4265322
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265322
16 years, 4 months
[JBoss Web Services Development] - Deploying RESTful Webservice on JBOSS 5.1.0 using Apache CXF
by damica
Hi Guys,
im trying to deploy a simple RESTful webservice on jboss 5.1.0 using apache CXF. But i'm getting this exception ' Could not find 'server '. Googling it didn't helped much. Below follows my web.xml, beans.xml which i done using the documentation on http://cwiki.apache.org/CXF20DOC/jax-rs.html. I'm also pasting the simple Web service and the exception itself.
I would be glad if you could help
------- Web.xml--------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet-name>CXFServlet1</servlet-name>
<display-name>CXF Servlet1</display-name>
<servlet-class> org.apache.cxf.transport.servlet.CXFServlet </servlet-class>
<init-param> <param-name>config-location</param-name> <param-value>/WEB-INF/beans.xml</param-value>
</init-param> <load-on-startup>1</load-on-startup>
<servlet-mapping> <servlet-name>CXFServlet1</servlet-name> <url-pattern>/1/*</url-pattern>
</servlet-mapping>
</web-app>
--------------- beans.xml--------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
<jaxrs:server id="customerService" address="/service1"> <jaxrs:serviceBeans> </jaxrs:serviceBeans>
</jaxrs:server>
--- The webservice--------------------------
package com.ixaris.webservices.rest.server; import javax.ws.rs.GET; import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Path("/hellobyrest")
public class RestHelloService {
public RestHelloService(){ }
@GET @Produces("text/plain")
public String getHelloMessage(){
return "hello world";
}
}
----Exception------------------------------------------------------
18:10:11,906 ERROR [AbstractKernelController] Error installing to Start: name=vfszip:/C:/dev/applications/JBoss/jboss-5.1.0.GA-jdk6/server/default/deploy/TestRESTWebservice-war-0.0.1.war/_WebBeansBootstrapBean state=Create javax.inject.DefinitionException: Could not find 'server'
atorg.jboss.webbeans.xml.ParseXmlHelper.loadElementClass(ParseXmlHelper.java:62)
at org.jboss.webbeans.xml.XmlParser.parseForBeans(XmlParser.java:149) at org.jboss.webbeans.xml.XmlParser.parse(XmlParser.java:64)
atorg.jboss.webbeans.bootstrap.WebBeansBootstrap.boot(WebBeansBootstrap.java:195)
atorg.jboss.webbeans.bootstrap.api.helpers.BootstrapBean.boot(BootstrapBean.java:120) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59) at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150) at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241) at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109) at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70) at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221) 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.hotdeploy.HDScanner.scan(HDScanner.java:362) at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: javax.inject.DefinitionException: server not a Java type ... 59 more 18:10:11,906 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: org.apache.cxf.transport.servlet.CXFServlet 18:10:12,000 INFO [TomcatDeployment] deploy, ctxPath=/TestRESTWebservice-war-0.0.1 18:10:12,015 INFO [1]] Marking servlet CXFServlet1 as unavailable 18:10:12,015 ERROR [1]] Servlet /TestRESTWebservice-war-0.0.1 threw load() exception java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:262) at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1006) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4421) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142) at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461) at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) at org.jboss.web.deployers.WebModule.start(WebModule.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) at $Proxy38.start(Unknown Source) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37) 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.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286) 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.ServiceController.doChange(ServiceController.java:688) at org.jboss.system.ServiceController.start(ServiceController.java:460) at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46) 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.hotdeploy.HDScanner.scan(HDScanner.java:362) at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) 18:10:12,015 WARN [HDScanner] Failed to process changes org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS IN ERROR: Deployment "vfszip:/C:/dev/applications/JBoss/jboss-5.1.0.GA-jdk6/server/default/deploy/TestRESTWebservice-war-0.0.1.war/_WebBeansBootstrapBean" is in error due to the following reason(s): javax.inject.DefinitionException: server not a Java type at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993) at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939) at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873) at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128) at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369) at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265321#4265321
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265321
16 years, 4 months