[jboss-user] [JBoss/Spring Integration] - Re: jboss-spring.xml beans location
do-not-reply at jboss.com
Fri Jul 6 10:37:59 EDT 2007
well .. still not giving it up ..
my jboss-spring.xml looks like the following
| <bean id="catalogDao" class="foo.bar.dao.DefaultCatalogDao" />
| <bean id="catalogService" class="foo.bar.service.DefaultCatalogService" >
| <property name="catalogDao" ref="catalogDao"/>
My stateless session bean covers a private object like
| private CatalogService catalogService
This works out fine ...
My simple jar based ( and spring deployer deployed ) target class is properly referenced by my stateless session bean. ( ssb gets injected and uses the reference )
The DefaultCatalogService covers a private object:
| private CatalogDao catalogDao ( setter is available as well )
This one should be injected during spring startup ....
but it definately does not ..
Catching an exception reveals that it has not been injected (Nullpointer ).
Again like some messages before I can see in the logs that the bean is properly created:
| (Creating instance of bean 'catalogDao' with merged definition [Root bean: class [foo.bar.dao.Defaul
| tCatalogDao]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=nu
| ll; defined in URL [jar:file:/home/tmaus/server/jboss-4.0.5.GA/server/default/tmp/deploy/tmp14056catalog.ear-contents/catalog-spring.spring!/META-INF/jboss-spring.xml]]
| 2007-07-06 16:15:34,897 DEBUG [org.springframework.beans.CachedIntrospectionResults] Not strongly caching class [foo.bar.dao.DefaultCatalogDao] because it is not cache-safe
so .. my question on this topic is ..
I can see that the complete spring framework gets properly instantiated, started and it configures everything properly ( it did so as well with the other spring beans which could not be referenced as described in former message )
Due to the fact that the dao does not get properly injected, I assume that the approach is facing a problem somewhere ... but I cannot say where ..
Hope you can help on this ..
greetings from berlin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061334#4061334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061334
More information about the jboss-user