[jboss-user] [Microcontainer] - Re: Deployment contextual information

alesj do-not-reply at jboss.com
Thu Feb 12 04:19:38 EST 2009


"david.lloyd at jboss.com" wrote : I see - so I can attach any kind of MetaData, so long as it implements MetaData?  Does the MDR (or any other project) define a convention for this?
  | 
Look at MutableMetaData class.
MetaData == any object; 
We just have annotation notion for ease of use.

Another useful class is MetaDataStack,
so you can get to MetaData instance from anywhere
- via classic thread local hack. :-)

"david.lloyd at jboss.com" wrote : 
  | What is the lifespan of something I put in there?
  | 
It's up to you.
We don't have any magic cleaning.
We only do a cleanup at undeploy - see your last question.

"david.lloyd at jboss.com" wrote : 
  | Can I cause leaks by attaching stuff?
  | 
Sure.
At the end, metadata is nothing more then sophisticated Map.
It's the api that makes it useful.

"david.lloyd at jboss.com" wrote : 
  | Is it removed on undeploy somehow?
  | 
Yes.
In DeployersImpl we call DeploymentContext::cleanup,
which cleans up the scope matching metadata retrievals.

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

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



More information about the jboss-user mailing list