[jboss-user] [JBoss/Spring Integration] - Re: jboss-spring.xml beans location
loumaus
do-not-reply at jboss.com
Fri Jul 6 04:47:42 EDT 2007
sorry .. badly explained ..
tow scenarios:
1. the target bean is directly embedded into the jboss-spring.xml looking like:
<bean id="catalogService" class="foo.bar.service.DefaultCatalogService"\>
everything works fine here ... of course .. as its the described way ..
2. the bean is referenced inside the jboss-spring.xml via an import tag:
\<import resource="classpath:catalog-beans.xml"/\>
The catalog-beans.xml is located inside the spring deployable package, accessable via classpath and it really get processed on server / ear startup.
( [org.springframework.aop.framework.JdkDynamicAopProxy] Creating JDK dynamic proxy for [foo.bar.service.DefaultCatalogService]
)
The important difference between both scenarios can be seen in the SpringInectionInterceptor output.
Scenario one outputs:
==============
Injecting bean 'catalogService' of class type foo.bar.service.DefaultCatalogService into foo.bar.ejb.DefaultCatalogServiceStateless at 6fa22b via private foo.bar.service.CatalogService foo.bar..ejb.DefaultCatalogServiceStateless.catalogService
Scnenario two, which does not work outputs:
============================
Injecting bean 'catalogService' of class type $Proxy168 into foo.bar.ejb.DefaultCatalogServiceStateless at ce4dda v
ia private foo.bar.service.CatalogService foo.bar.ejb.DefaultCatalogServiceStateless.catalogService
The injected class types differ. In the working scenario the SpringInjectionInterceptor is using an existing class, whereas it is using a proxy class in the none working scenario.
And this is the problem im facing ....
Hope you understood what i meant
:O)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061161#4061161
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061161
More information about the jboss-user
mailing list