This content has been marked as final.
Show 3 replies
-
1. Re: Injecting into the Containers
alrubinger May 26, 2009 6:18 PM (in response to alrubinger)"ALRubinger" wrote:
* New Deployer to Create a Metrics POJO, then attach it to the DeploymentUnit
* Ejb3Deployer picks up the attachment and sets it upon the Ejb3JBoss5Deployment.
* Containers get at the Metrics POJO via getDeployment().
Alternatively I can:
* Have Ejb3MetricsDeployer come along *after* Ejb3Deployer
* Pick out all Containers created from the Deployment
* Inject Metrics POJOs into each of them
...thus adding metrics becomes a concern atop EJB3. ejb3-core then relies only upon ejb3-metrics-spi, and ejb3-metrics-impl can be a JAR which includes the Ejb3MetricsDeployer definition in a jboss-beans.xml.
But ejb3-core still needs to make the calls to the underlying metrics collectors, so we still mix concerns unless we start intercepting things like createSession and destroySession via AOP.
S,
ALR -
2. Re: Injecting into the Containers
wolfc May 27, 2009 1:41 AM (in response to alrubinger)You're collecting session metrics from the wrong spot. You should be collecting those metrics from pool and cache. Only call metrics should come from container.
The pool and cache should actually be deployed by a separate deployer before the container gets deployed. So that these are MC beans which are injected into the container.
Injection on the containers does work, however:
A lot of stuff gets set on the container, because we use it for dependency resolving, which is done before the container is started. This needs the new deployers and a proper dependency resolving framework to work. https://jira.jboss.org/jira/browse/RELOADED-8 -
3. Re: Injecting into the Containers
alrubinger May 27, 2009 11:13 AM (in response to alrubinger)wolfc" wrote:
You're collecting session metrics from the wrong spot. You should be collecting those metrics from pool and cache. Only call metrics should come from container.
The pool and cache should actually be deployed by a separate deployer before the container gets deployed. So that these are MC beans which are injected into the container.
OK. It's worth noting that this has become a high priority, so I'm hesitant to go down the road of separate cache/pool deployers for this first stab.wolfc" wrote:
Injection on the containers does work
...how, where? Currently I don't see a mechanism to inject a known bean name. Injection via autowiring is simple as @Inject on a setter method.
S,
ALR