[jboss-dev-forums] [Design the new POJO MicroContainer] - What is going on with aliases?

adrian@jboss.org do-not-reply at jboss.com
Mon Jul 9 10:23:10 EDT 2007


  |  public class AbstractKernelDeployment extends JBossObject
  |     implements KernelDeployment, MutableLifecycleHolder, Serializable
  |  {
  | -   private static final long serialVersionUID = 1;
  | +   private static final long serialVersionUID = 2l;
  |  
  |     /** The name of the deployment */
  |     protected String name;
  | @@ -92,7 +92,7 @@
  |     protected ControllerMode mode;
  |  
  |     /** The aliases */
  | -   protected Set<NamedAliasMetaData> aliases;
  | +   protected List<NamedAliasMetaData> aliases;
  | 

None of this makes any sense to me. I don't remember you discussing
any of these changes?

The order of the aliases cannot matter and you can't have an alias more than once.
So why a List when a Set describes exactly what is required.

Also what does it mean for a deployment rather than a bean to have an alias?
Is this a Spring thing?

As far as I can tell, your DeploymentAliasMetaDataDeployer is just going to fail
when a deployment has more than one bean in it.
You will try to apply the alias names to all the beans in the deployment.
Only one of the beans can have an alias. It must be unique!

Also, the component deployer was not intended for this kind of thing.

The idea of a component is to represent a part of a deployment,
e.g. a single ejb in an ejb jar or single bean in a -beans.xml
soon I will be using the components to assign scopes for the MetaDataRepository
where instance=component-name 
This kind of hack is just going to confuse things. 
There should be only one scope not a scope for every alias.


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

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



More information about the jboss-dev-forums mailing list