[Design of POJO Server] - Re: Controlling deployments via a barrier bean
by adrian@jboss.org
"bstansberry(a)jboss.com" wrote :
| Essentially we're talking about another step in the lifecycle -- create/start/activate/deactivate/stop/destroy that all containers would have to support.
|
I don't really see it as a true lifecycle step since you're NOT waiting to resolve a
dependency. The context is in a valid final state, its just inactive.
I suppose you could see it as an alternative to the "Installed" state, e..g
InstalledInactive and InstalledActive could be alternate states
with some processing going on when it switches between the states.
But the transistion is decided by some arbitrary notiifcation, not a dependency
(unless you count the dependency on oneself being installed :-)
anonymous wrote :
| Thinking a bit about whether that maps to the "valve" concept where (AIUI) a component is brought all the way to DeploymentStage.REAL and in a final change to DeploymentStage.INSTALLED external things like JNDI refs, request pipelines etc are switched.
|
It certainly relates to the valve, but the valve mainly involves tracking and waiting
for requests to complete.
Again this could be considered a different state
where you allow old requests but hold/deny new ones.
A sort of "InstalledDeactivating" state. ;-)
Whether we would actually implement it that way, is a different issue.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4155770#4155770
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4155770
17 years, 10 months
[Design of POJO Server] - Metadata view with system properties resolved
by bstansberry@jboss.com
>From another thread:
"adrian(a)jboss.org" wrote :
| "bstansberry(a)jboss.com" wrote :
| | OT: Is there a general automagic facility/utility yet for doing String property replacement when populating metadata? For org.jboss.ejb3.annotation.clustered there's still manual code that does the property replacement.
|
| You'll have to explain what you mean on a different thread.
|
| If I understand correctly ...
| I don't think its possible in general since in most cases
| MetaData.getAnnotation() will just be returning Class.getAnnotation()
| which is immutable, its a jdk object and
| we don't "intercept" the fine grained Clustered.partition() invocation.
|
My question was quite confused. :( Not about populating metadata at all.
The issue is more one of having a mechanism that provides a view on metadata where system property references are resolved. Basically an aspect that does the system property resolution on read operations on a metadata object.
AIUI, right now JBossXB can resolve system properties when populating a metadata object. But if you do that you lose the original underlying value. And if the metadata object is backed by an annotation, JBossXB doesn't come into play.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4155768#4155768
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4155768
17 years, 10 months
[Design of POJO Server] - Re: Controlling deployments via a barrier bean
by bstansberry@jboss.com
Re: the property replacement, yeah, my question wasn't clear. I'll open another thread.
"adrian(a)jboss.org" wrote : That's why I suggested a jboss-activation.xml to try to make it easier to manage. The downside is it pushes the responsibility of this new metadata to the subsystems to read it, since only they know what it means to activate their fine-grained component.
Essentially we're talking about another step in the lifecycle -- create/start/activate/deactivate/stop/destroy that all containers would have to support.
Thinking a bit about whether that maps to the "valve" concept where (AIUI) a component is brought all the way to DeploymentStage.REAL and in a final change to DeploymentStage.INSTALLED external things like JNDI refs, request pipelines etc are switched.
Interesting thing to me about this is for JEE components it allows a fast activation following ha singleton failover, since the service is 90+% ready to go when the node becomes master.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4155764#4155764
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4155764
17 years, 10 months
[Design of POJO Server] - Replacing system properties in metadata
by adrian@jboss.org
Brian asked on another thread about automatically replacing system properties on
annotations.
First, I suppose if we were going to do this, it would need a meta annotation
to trigger the behaviour otherwise it would be doing a lot of work unnecessarily.
e.g.
| @org.jboss.metadata.spi.Replaceable
| public @interface Clustered
| {
| String partition() default = "${jboss.parition.name:DefaultDomain";
| }
|
Then we could add something to MetaDataRetrievalToMetaDataBridge
that does the replacement, e.g.
|
| public <T extends Annotation> T getAnnotation(Class<T> annotationType)
| {
| if (annotationType == null)
| throw new IllegalArgumentException("Null annotationType");
| AnnotationItem<T> item = retrieval.retrieveAnnotation(annotationType);
| if (item == null)
| return null;
| - return item.getValue();
| + T result = item.getValue();
| + if (annotationType.hasAnnotation(Replaceable.class))
| + result = checkReplaceable(result);
| + return result;
| }
|
Where checkReplaceable() either
1) creates a new annotation from the original one with system properties replaced.
2) wraps the annotation in a dynamic proxy that implements the annotation interface
and does the replacement lazily
Similar code would be required for getAnnotations()
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4155761#4155761
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4155761
17 years, 10 months