junit - Unit Testing based on JNDI , ejb and spring -
in application injecting of services based on ejb use of spring ioc through jndiobjectfactorybean below mentioned during run junit getting exception "java.lang.illegalargumentexception: jndi operation not implemented jndi provider."
could please let me know how i'll configure junit.
<bean id="xxxmenuitemservice" class="xxxmenuitemserviceyyy"> <property name="xxxmenuitemdelegator" ref="xxxmenuitemdelegator" /> </bean> <bean id="approvemenuitemserviceremote" class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jndiname" value="ejb/xxxxxxxx" />
have @ simplenamingcontextbuilder
org.springframework.mock
provides full context builder can bind mock or other objects use spring's jndi lookup.
one thing though make sure build simplenamingcontextbuilder
in static @beforeclass
of junit 4. means initialized , waiting before spring application context started , won't have jndi lookup failures.
Comments
Post a Comment