[jboss-user] [Microcontainer] - Re: Service POJO JNDI Binding Problem

ralfsteppacher do-not-reply at jboss.com
Fri Jan 16 08:47:43 EST 2009


"alesj" wrote : 
  | Post the JNDIBinding/Interceptor code.
  | 

This is my jboss-beans.xml:


  | 	<!-- Commented out because it led to the initial error where JBoss AS complained
  | 		that a bean with the name AspectManager was already deployed. -->
  | 	<!--bean name="AspectManager" class="org.jboss.aop.AspectManager">
  | 		<constructor factoryClass="org.jboss.aop.AspectManager"
  | 			factoryMethod="instance" />
  | 	</bean-->
  | 
  | 	<!-- Define the jndi binding advice -->
  | 	<beanfactory name="JndiAdvice"
  | 		class="org.jboss.aop.microcontainer.aspects.jndi.JndiIntroduction">
  | 		<property name="env">
  | 			<map class="java.util.Properties" keyClass="java.lang.String"
  | 				valueClass="java.lang.String">
  | 				<entry>
  | 					<key>java.naming.factory.initial</key>
  | 					<value>
  | 						org.jboss.example.microcontainer.aspects.EnvInitialContextFactory
  | 					</value>
  | 				</entry>
  | 			</map>
  | 		</property>
  | 	</beanfactory>
  | 
  | 	<bean name="JndiAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
  | 		<property name="advice">
  | 			<inject bean="JndiAdvice" />
  | 		</property>
  | 		<property name="manager">
  | 			<inject bean="AspectManager" />
  | 		</property>
  | 	</bean>
  | 
  | 	<!--
  | 		Introduce the KernelControllerContextAware interface to the
  | 		JndiBinding annotation
  | 	-->
  | 	<bean name="JndiIntroduction"
  | 		class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
  | 		<property name="classes">
  | 			@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding</property>
  | 		<property name="interfaces">
  | 			<list elementClass="java.lang.String">
  | 				<value>org.jboss.kernel.spi.dependency.KernelControllerContextAware
  | 				</value>
  | 			</list>
  | 		</property>
  | 		<property name="manager">
  | 			<inject bean="AspectManager" />
  | 		</property>
  | 	</bean>
  | 
  | 	<!--
  | 		Apply the jndi binding to all KernelControllerContextAware interface
  | 		callbacks
  | 	-->
  | 	<bean name="JndiBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
  | 		<property name="pointcut">execution(*
  | 			$instanceof{org.jboss.kernel.spi.dependency.KernelControllerContextAware}->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))
  | 		</property>
  | 		<property name="aspect">
  | 			<inject bean="JndiAspect" property="definition" />
  | 		</property>
  | 		<property name="manager">
  | 			<inject bean="AspectManager" />
  | 		</property>
  | 	</bean>
  | 
  | 	<bean name="HibernateConfigService" class="ch.abraxas.base.infra.HibernateConfigService">
  | 		<annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="hibernate/HibernateConfigService")</annotation>
  | 	</bean>
  | 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202470#4202470

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202470



More information about the jboss-user mailing list