You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by David Sells <ds...@gmail.com> on 2009/07/24 20:19:19 UTC
Deploying Spring-Integration example
Hi David et al,
I'm wondering if the Spring-Integration example is deployable. The program
compiles and runs through its' JUnit tests but when I try to deploy:
openejb deploy spring-integration-1.0.jar
(Note that the Calculator example deploys correctly)
I get the following exception. I don't see a way around this problem:
Thanks, David S.
org.apache.openejb.OpenEJBException: No provider available for resource-ref
'null' of type 'org.superbiz.spring.Theaters' for 'CineplexImpl'.
at
org.apache.openejb.config.AutoConfig.autoCreateResource(AutoConfig.java:1342)
at
org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1335)
at
org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1286)
at
org.apache.openejb.config.AutoConfig.processResourceRef(AutoConfig.java:799)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:724)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:133)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:247)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:601)
at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:143)
at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:78)
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.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:158)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:141)
at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:122)
at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:221)
at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:174)
at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:136)
at
org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:238)
at
org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:129)
at
org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:196)
at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:149)
at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:71)
at
org.apache.openejb.server.ejbd.KeepAliveServer$Session.service(KeepAliveServer.java:213)
at
org.apache.openejb.server.ejbd.KeepAliveServer.service(KeepAliveServer.java:233)
at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:66)
at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:91)
at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:120)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
at java.lang.Thread.run(Thread.java:595)
Re: Deploying Spring-Integration example
Posted by Karan Malhi <ka...@gmail.com>.
>
> This could be solved by having OpenEJB aggressively boot your spring
> application for your at deploy time while it's booting your application.
> Then the same import/export could be done and all things would work
> bi-directionally. We could potentially look for a Spring file named
> META-INF/openejb-spring.xml (or something like that) and boot it with the
> application. Then all the existing import/export code we have could be
> executed things would work fine.
>
Or openejb-spring.xml could be the default file name and then also allow the
user to specify the file name/s in the conf file
<Resource type="Spring">
ConfigFiles context-file1.xml,context-file2.xml
</Resource>
--
Karan Singh Malhi
Re: Deploying Spring-Integration example
Posted by Karan Malhi <ka...@gmail.com>.
>
> This could be solved by having OpenEJB aggressively boot your spring
> application for your at deploy time while it's booting your application.
> Then the same import/export could be done and all things would work
> bi-directionally. We could potentially look for a Spring file named
> META-INF/openejb-spring.xml (or something like that) and boot it with the
> application. Then all the existing import/export code we have could be
> executed things would work fine.
>
Or openejb-spring.xml could be the default file name and then also allow the
user to specify the file name/s in the conf file
<Resource type="Spring">
ConfigFiles context-file1.xml,context-file2.xml
</Resource>
--
Karan Singh Malhi
Re: Deploying Spring-Integration example
Posted by David Blevins <da...@visi.com>.
On Jul 24, 2009, at 11:19 AM, David Sells wrote:
> Hi David et al,
>
> I'm wondering if the Spring-Integration example is deployable. The
> program
> compiles and runs through its' JUnit tests but when I try to deploy:
>
> openejb deploy spring-integration-1.0.jar
>
> (Note that the Calculator example deploys correctly)
>
> I get the following exception. I don't see a way around this problem:
>
> Thanks, David S.
>
> org.apache.openejb.OpenEJBException: No provider available for
> resource-ref
> 'null' of type 'org.superbiz.spring.Theaters' for 'CineplexImpl'.
The example really shows a standalone java application that boots
Spring which in turn boots OpenEJB as an embedded container. In this
scenario the Spring context and the EJB applications are essentially
getting booted at the same time; first the Spring context then the
OpenEJB and side of things are kicked off via an
ApplicationContextAware object configured in the Spring xml. So
essentially Spring boots OpenEJB which is itself a spring bean that is
ApplicationContextAware and can then import/export all sorts of things
to and from the Spring context.
The details on how to do the reverse haven't been worked on yet --
definite area for contribution if anyone is interested.
When you go to deploy an application that uses Spring into OpenEJB or
Tomcat+OpenEJB, then for all intense purposes Spring and the Spring
context do not exist yet and nothing can be imported/exported and the
result errors saying things your application expects can't be found.
This could be solved by having OpenEJB aggressively boot your spring
application for your at deploy time while it's booting your
application. Then the same import/export could be done and all things
would work bi-directionally. We could potentially look for a Spring
file named META-INF/openejb-spring.xml (or something like that) and
boot it with the application. Then all the existing import/export
code we have could be executed things would work fine.
Not something I have time to work on but more than happy to help
anyone who does. Happy to clock in some dev list, irc, or even skype
time if someone wanted to give it a go.
-David