[JBoss/Spring Integration] - Re: Spring Component Auto Detection
by mike_mackey
"marius.bogoevici" wrote : Mike,
|
| What you need to do is to add a similar contextClass configuration to your DispatcherServlet. There are two application contexts that get created with your Spring application, and in your case you need to deal with both.
|
| Marius
Firstly Marius ... A huge amount of thanks for the quick reply, I really appreciate it.
I had pretty much guessed that from this http://static.springframework.org/spring/docs/2.0.x/api/org/springframewo...
anonymous wrote : A web application can define any number of DispatcherServlets. Each servlet will operate in its own namespace, loading its own application context with mappings, handlers, etc. Only the root application context as loaded by ContextLoaderListener, if any, will be shared.
In my defence I did say I was a noob ... what should be added just in case anyone else was up too late last night :-)
| <servlet>
| <servlet-name>amartus</servlet-name>
| <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
| <init-param>
| <param-name>contextClass</param-name>
| <param-value>org.jboss.spring.factory.VFSXmlWebApplicationContext</param-value>
| </init-param>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239158#4239158
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239158
16 years, 10 months
[EJB 3.0] - ejb-jar indirection
by goldberg.howard
I'm fuzzy on the patterns to create indirection using the right annotation attributes in conjunction with ejb-jar entries, and I haven't found a good reference or example. Can someone help with the following:
I have interfaces
I
@Local ILocal extends I
@Remote IRemote extends I
and 2 different beans that implement these interfaces
@Stateless VendorAImpl implements ILocal, IRemote
@Stateless VendorBImpl implements ILocal, IRemote
In a separate module, I have a dependency injection
@ejb ILocal someVendorImpl;
1.
How do I set up the ejb-jar files in both modules so that the module containing the dependency injection can independently refer to either vendor-specific modules.
2. The module containing the dependency injection shouldn't care whether the referenced bean is local or remote,
e.g., @ejb I someVendorImpl;
How do I set up the ejb-jar files so that the module contianing the dependency injection is independent of the implementation's actual location.
Thanks,
Howard
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239147#4239147
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239147
16 years, 10 months
[JBoss/Spring Integration] - Re: Installation Instructions for JBoss 4.2.3.GA?
by Crucifix
Thanks for the response! Unfortunately, I'm doing something wrong as I'm still not able to get the deployer working.
I've downloaded the spring-deployer.zip and extracted the jboss-spring-jdk5.deployer directory from inside it to my JBoss deploy/ directory.
Inside the extracted deployer directory, I've replaced 'jboss-spring-jdk5.jar' with the downloaded 'jboss-spring-jdk5-2.5.jar'. Now, when I start JBoss (this is a fresh install with no software deployments yet), I receive the following error:
| 2009-06-22 09:04:49,049 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/C:/DEVEL/JAVA/jboss-4.2.3.GA/server/default/deploy/jboss-spring-jdk5.deployer/
| org.jboss.deployment.DeploymentException: Cannot instanciate MBean: org.jboss.spring.deployment.SpringDeployer; - nested throwable: (javax.management.NotCompliantMBeanException: Cannot insta
| nciate MBean: org.jboss.spring.deployment.SpringDeployer)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
| at org.jboss.system.ServiceController.install(ServiceController.java:226)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:251)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.management.NotCompliantMBeanException: Cannot instanciate MBean: org.jboss.spring.deployment.SpringDeployer
| at org.jboss.mx.server.MBeanServerImpl.handleExceptionOnCreate(MBeanServerImpl.java:361)
| at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:349)
| at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:451)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
| ... 81 more
|
Any idea what I've done wrong? Thanks!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239144#4239144
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239144
16 years, 10 months