[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Adding ManagedObjectCreator support to AbstractSimpleRea
adrian@jboss.org
do-not-reply at jboss.com
Tue Sep 4 13:24:37 EDT 2007
"scott.stark at jboss.org" wrote : Note that the parameterized type for these deployers should really be AbstractSimpleRealDeployer<T extends Serializable> as the deployment instance needs to be castable to Serializable for the ManagedObjectFactory.
|
You can't do that. Its perfectly possible that the AbstractRealDeployer
is dealing with a transient attachment that is not intended for the management layer.
In fact, thinking about it. We shouldn't be encouraging the real deployers to do
the managed objects anyway. That should really be done in the parsing deployers.
I would be in favour of making the parsing deployers require Serializable attachments
which would mean the AppParsing deployer would currently fail to compile. ;-)
If both the parsing deployer and the real deployer have this code
for the same attachment its going to duplicate work.
So I'd like to change my vote to no. :-)
Although you could add a configuration flag to the deployer:
| private boolean buildManagedObject = false; // + getter and setter
| public void build(DeploymentUnit unit, Map<String, ManagedObject> managedObjects)
| {
| if (buildManagedObject)
| {
| ...
| }
| }
|
so it would be easy to enable it in other cases, i.e. via the configuration of the deployer.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081003#4081003
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081003
More information about the jboss-dev-forums
mailing list