applicationContext - null value from getter. Please help.

applicationContext - null value from getter. Please help.

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
jwalters
Posts: 1
Joined: 29 Oct 2013, 17:21

applicationContext - null value from getter. Please help.

Post by jwalters »

Dear All.

I am using spring 3.0 and trying to inject the beans using the setter methods. Here when i have both the property name and the reference bean name as same/ identical, it works properly. But when i change the reference name as something different from the property name, it gives returns me null object. please help. thank you very much.

with same name: (the bean gets returned successfully)
=========================================
<bean id="BMOWirBaseAction" class="com.symcor.wiradmin.web.action.WIRAdminBaseAction">
<property name="cacheDelegate">
<ref bean="cacheDelegate" />
</property>
</bean>

with different name: (null getting returned)
============================================
<bean id="BMOWirBaseAction" class="com.symcor.wiradmin.web.action.WIRAdminBaseAction">
<property name="cacheDelegate">
<ref bean="BMOCacheDelegate" />
</property>
</bean>

JAVA Code:
==========
public class WIRAdminBaseAction extends ActionSupport implements Preparable, ParameterAware, Parameterizable, SessionAware,RequestAware {

private ICacheDelegate cacheDelegate;

public ICacheDelegate getCacheDelegate() {
return cacheDelegate;
}

public void setCacheDelegate(ICacheDelegate cacheDelegate) {
this.cacheDelegate = cacheDelegate;
}
}


bye, Jonathan
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: applicationContext - null value from getter. Please help

Post by knorke »

I believe you are looking for the java spring framework thing.
Here you are at the site of spring RTS, a game engine ;)
Post Reply

Return to “Help & Bugs”