eXo Kernel :: MC Kernel Integration :: Implementation 2.4.9-GA

org.exoplatform.container.mc.impl
Class MCIntConfig

java.lang.Object
  extended by org.exoplatform.container.mc.impl.MCIntConfig

public class MCIntConfig
extends Object

Configuration reader and holder for conf/mc-int-config.xml mc-int-config.xml uses jboss bean deployer syntax (the one used in jboss-beans.xml). It is only interested in annotation and injection configuration though, and doesn't treat element attributes as referring to mc bean declarations - it treats them as references to exo-kernel components.

Example:

 
 
    @org.exoplatform.container.mc.impl.InterceptMC
 
 
    @org.exoplatform.container.mc.impl.InterceptMC(injectionMode=
    org.exoplatform.container.mc.impl.MCInjectionMode.STANDARD)
 
 

In the above example the first bean declaration refers to exo-kernel configured service that is returned by exo container when calling getComponentInstanceOfType(clazz). The second bean declaration refers to exo-kernel configured service that is returned by exo container when calling getComponentInstance(name). This configuration makes it possible to activate injection outside of you classes. When annotations are declared both inside the class, and in mc-int-config.xml, the latter completely overrides the former. It is also possible to use mc-int-config.xml to nullify an existing annotation in your service class. Warning: Make sure there are no leading or trailing white spaces in the body of annotation element.

Author:
Marko Strukelj

Method Summary
 org.jboss.beans.metadata.plugins.AbstractBeanMetaData getByAdapter(org.picocontainer.ComponentAdapter adapter)
          Retrieve configuration for specific component adapter.
 org.jboss.beans.metadata.plugins.AbstractBeanMetaData getByBean(String bean)
          Retrieve configuration by component type.
 org.jboss.beans.metadata.plugins.AbstractBeanMetaData getByKey(String key)
          Retrieve configuration by component key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getByKey

public org.jboss.beans.metadata.plugins.AbstractBeanMetaData getByKey(String key)
Retrieve configuration by component key.

Parameters:
key - component key
Returns:
configuration for specific component

getByBean

public org.jboss.beans.metadata.plugins.AbstractBeanMetaData getByBean(String bean)
Retrieve configuration by component type.

Parameters:
bean - component type
Returns:
configuration for specific component

getByAdapter

public org.jboss.beans.metadata.plugins.AbstractBeanMetaData getByAdapter(org.picocontainer.ComponentAdapter adapter)
Retrieve configuration for specific component adapter. First lookup by key, then by type.

Parameters:
adapter - component adapter
Returns:
configuration for specific component

eXo Kernel :: MC Kernel Integration :: Implementation 2.4.9-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.