|
From: Cecil N. <cec...@gm...> - 2008-05-03 03:41:17
|
On Fri, May 2, 2008 at 5:20 PM, Bill Burke <bb...@re...> wrote: > I'm baffled. Here's a simple I used to test things: > > > http://resteasy.svn.sourceforge.net/viewvc/resteasy/trunk/jaxrs/jboss-integration-testing/spring-integration-test/ > Took your example and modified it a bit to do some bean wiring. The first thing I noticed is that you use spring 2.5... I'm still at 2.0. Do you know if that is a strict dependency? Assuming not... Not sure that the mail list can take attachments, but I'll try that first. - tweaked the LocatingResource.java code to add some get/set methods for spring to use when configuring the bean. - Added setup in applicationContext.xml and reverted to spring 2.0 - Set the scan to true (otherwise no jax-rs classes get registered - Tweaked my standard build.xml to handle the directories in this case Here is console output on deploy and a few lines after a test url. You will see that on startup the new variable in LocatingResouce is set to "OK" by spring. But on the GET url, it is null. {Hoping that maybe this is all due to need for spring 2.5 and that it isn't something more serious. I'll take a stab using 2.5 next with this revised example.} Thanks for your help. 23:27:31,665 INFO [TomcatDeployer] deploy, ctxPath=/spring-integration-test, wa rUrl=.../tmp/deploy/tmp61989spring-integration-test-exp.war/ 23:27:32,587 INFO [STDOUT] FOUND JAX-RS resource: org.jboss.resteasy.test.smoke .LocatingResource 23:27:32,618 INFO [STDOUT] FOUND JAX-RS resource: org.jboss.resteasy.test.smoke .SimpleResource 23:27:32,633 INFO [[/spring-integration-test]] Initializing Spring root WebAppl icationContext 23:27:32,633 INFO [ContextLoader] Root WebApplicationContext: initialization st arted 23:27:32,665 INFO [XmlWebApplicationContext] Refreshing org.springframework.web .context.support.XmlWebApplicationContext@abe449: display name [Root WebApplicat ionContext]; startup date [Fri May 02 23:27:32 EDT 2008]; root of context hierar chy 23:27:32,743 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from S ervletContext resource [/WEB-INF/applicationContext.xml] 23:27:32,805 INFO [XmlWebApplicationContext] Bean factory for application conte xt [org.springframework.web.context.support.XmlWebApplicationContext@abe449]: or g.springframework.beans.factory.support.DefaultListableBeanFactory@11f81b0 23:27:32,837 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@11f81b0: de fining beans [simple,locating]; root of factory hierarchy 23:27:32,868 INFO [STDOUT] Inside setSpringTest() with OK 23:27:32,868 INFO [ContextLoader] Root WebApplicationContext: initialization co mpleted in 235 ms http://localhost/spring-integration-test/locating/basic 23:28:10,712 INFO [STDOUT] LOCATING...(null) 23:28:10,712 INFO [STDOUT] getBasic() |