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

alesj do-not-reply at jboss.com
Fri Jan 16 06:06:16 EST 2009


"ralfsteppacher" wrote : 
  | Any help on how to do service lookup differently 
  | 
Read my reply here - the first part:
 - http://www.jboss.com/index.html?module=bb&op=viewtopic&t=148288

Or add more details of what you're trying to do.

"ralfsteppacher" wrote : 
  | how to solve the above problem is greatly appreciated!
  | 
I guess you need this -- see AspectManager bean.

  |    <!--
  |       Valid values for the AspectManager bean for use with enableTransformer=true are:
  |       * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
  |       * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
  |    -->
  |    <bean name="AspectManagerJDK5" class="org.jboss.aop.deployers.AspectManagerJDK5">
  |       <constructor>
  |          <parameter><![CDATA[
  | 	         <aop>
  | 			      <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
  | 					   <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
  | 				      <advice name="process" aspect="mainDeployer"/>
  | 				   </bind>
  | 					<aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
  | 					<bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
  | 				      <advice name="setValue" aspect="persist"/>
  | 				   </bind>
  | 				</aop>]]>
  | 	      </parameter>
  |       </constructor>
  | 
  |       <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
  | 
  |       <property name="enableLoadtimeWeaving">false</property>
  |       <!-- only relevant when EnableLoadtimeWeaving is true.
  |            When transformer is on, every loaded class gets
  |            transformed.  If AOP can't find the class, then it
  |            throws an exception.  Sometimes, classes may not have
  |            all the classes they reference.  So, the Suppressing
  |            is needed.  (i.e. Jboss cache in the default configuration -->
  |       <property name="suppressTransformationErrors">true</property>
  |       <property name="prune">true</property>
  |       <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
  |       <property name="exclude">org.jboss.</property>
  |       <!-- This avoids instrumentation of hibernate cglib enhanced proxies
  |       <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
  |       <property name="optimized">true</property>
  |       <property name="verbose">false</property>
  |       <!--
  |          Available choices for this attribute are:
  |             org.jboss.aop.instrument.ClassicInstrumentor (default)
  |             org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
  |        <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
  |       -->
  |    </bean>
  | 
  |    <!-- Simplify name usage -->
  |    <bean name="AspectManager">
  |       <constructor factoryMethod="getAspectManager"><factory bean="AspectManagerJDK5"/></constructor>
  |    </bean>
  | 

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

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



More information about the jboss-user mailing list