-
1. Re: EJB3 managed component names and types
ips Jun 10, 2009 6:42 PM (in response to ips)After thinking about this some more, the instance metrics and invocation metrics for a given EJB3 SLSB are currently exposed via two different component instances, both of type EJB3:SLSB. This goes against the rule that all components of a given type should have the same signature (i.e. set of properties and operations). At least I think this should be a rule, and I think Scott is in agreement. Otherwise, clients end up needing to first query by type and then parse the returned component names to determine the component's "sub-type", rather than being able to query on the type alone.
So in this case, I think we should either have
1) a single component type EJB3:SLSB with one component instance of that type per SLSB that exposes both instance and invocation metrics
or
2) two component types EJB3:SLSB-instance and EJB3:SLSB-invocation with one component instance for each of these types per SLSB
Thoughts? -
2. Re: EJB3 managed component names and types
alrubinger Jun 10, 2009 10:05 PM (in response to ips)I'll reply to this one very generally. :)
Citing: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=156782
As an EJB3 team member, I don't have any opinion/input on what the mappings should be. Things like naming conventions and desired properties are requests of the Jopr project.
I've introduced the test case in AS to halt the changing requirements. From the onset I haven't had clear definition, and we've had many change/release/integration requests already. Let's get everything ironed in contract in Branch_5_x, clear the test, and then merge when done.
http://anonsvn.jboss.org/repos/jbossas/branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/Ejb3MetricsUnitTestCase.java
S,
ALR -
3. Re: EJB3 managed component names and types
ips Jun 11, 2009 7:41 AM (in response to ips)Sure, I can update the test case for what I'd like to see this look like. Before I do, can you verify that 1) is possible from a technical perspective (i.e. merging the instance and invocation MO pairs into single MOs)? If not, I'll update the test case for 2).
I'm sorry you weren't given a clearer definition up front. I think it's partly because the Profile Service is so new and best practices for designing managed objects did not yet exist. I will start a new forum thread on MO design best practices, where I'll start off a list. Once we come to consensus, I'll create a page on the Wiki. -
4. Re: EJB3 managed component names and types
alrubinger Jun 11, 2009 1:58 PM (in response to ips)Sure, both 1) and 2) are OK.
Also I'm not complaining / mandating this test case because I'm upset; you guys have been helpful in IRC. But I believe we can be more efficient than we've been in recent weeks. ;)
S,
ALR -
5. Re: EJB3 managed component names and types
ips Jun 11, 2009 4:49 PM (in response to ips)I've updated the test to reflect 1) in r90106. Note, I also renamed the stats-related props and ops to "*invocationStats" rather than just "*Stats", since they will no longer live in MOs specific to invocation metrics.
Still left to do in the test:
1) Deploy an EAR that contains an EJB-JAR containing the various types of EJBs, so we can test the component name format is as expected for EJB's inside EARs (e.g. "my.ear/MySFSB").
2) Include MDBs and Entity Beans in the test EJB-JARs and implement tests for the corresponding MOs.
ALR, if you agree with the above action items, would you please implement them?
Thanks,
Ian -
6. Re: EJB3 managed component names and types
alrubinger Jun 11, 2009 4:53 PM (in response to ips)Yep, I'll take care of those, thanks for the test updates.
S,
ALR -
7. Re: EJB3 managed component names and types
ips Jun 11, 2009 5:08 PM (in response to ips)Oh, I forgot to add a name prop to the list of expected props (its value would be the EJB name, and it would be ViewUse.CONFIGURATION and read-only). I just added it.
-
8. Re: EJB3 managed component names and types
alrubinger Jun 15, 2009 10:28 PM (in response to ips)I've integrated into Branch_5_x jboss-ejb3-metrics-deployer which passes Ian's acceptance tests.
Still need to:
* Do the EAR tests
* The MDB tests
* Entity tests (as recently requested in JBAS-7008 comment).
Will look into those tomorrow evening; I'm off of dev during the day this week only for RHCT training.
S,
ALR -
9. Re: EJB3 managed component names and types
ips Jun 16, 2009 11:18 AM (in response to ips)I've added the MDB and entity tests. I've also added tests for checking the format of the "invocationStats" property. They check that the property is in the same format that Jason used for the EJB2 invocation stats (as we discussed a few weeks back, it makes sense for you gusy to both use the same metatype). I also renamed the component subtypes to be consistent with the subtypes that Jason used for EJB2.
Tests for EJBs within EARs still need to be added. -
10. Re: EJB3 managed component names and types
alrubinger Jun 16, 2009 12:28 PM (in response to ips)"ips" wrote:
I've added the MDB and entity tests. I've also added tests for checking the format of the "invocationStats" property. They check that the property is in the same format that Jason used for the EJB2 invocation stats (as we discussed a few weeks back, it makes sense for you gusy to both use the same metatype). I also renamed the component subtypes to be consistent with the subtypes that Jason used for EJB2.
Hero. :D"ips" wrote:
Tests for EJBs within EARs still need to be added.
I'll do these.
S,
ALR -
11. Re: EJB3 managed component names and types
alrubinger Jun 17, 2009 1:38 AM (in response to ips)I've pushed another alpha release of the metrics deployer, this one:
* Includes the MetaMapper for the invocation statistics
* Updates the component subtypes as requests
SLSB and SFSB tests now passing again. There are some TODOs in the tests themselves I haven't yet done anything with; were those intended for me or were you marking it for yourself for later, Ian?
MDB and Entity tests still not passing as no MDBs or Entities are deployed. ;) These should be pretty trivial, but I've got to call it a night and stop here for now.
Outstanding question: "invocationStatsLastResetTime" is a managed property upon the MOs themselves, but is also available via the "invocationStats" mapped property. Which would you like (I'm assuming not both)?
I believe the weekly Jopr confcall is tomorrow, though I'll be unavailable by voice I'll try to pop into IRC if I can.
S,
ALR -
12. Re: EJB3 managed component names and types
alrubinger Jun 18, 2009 3:18 AM (in response to ips)In Branch_5_x now all tests are passing for SFSB, SLSB, MDB. Ian, please review and once approved, I'll cut Beta-level releases and merge into JBPAPP_5_0.
Note I've removed Entity metrics from scope:
https://jira.jboss.org/jira/browse/JBAS-7008
S,
ALR -
13. Re: EJB3 managed component names and types
alrubinger Jun 24, 2009 12:38 AM (in response to ips)Last round of requests from Ian was:
1) Use delimiter "/" between EAR, JAR, and EJB names when constructing the component name
2) Add tests for EAR deployments
3) Address non-unique component name collisions due to improper JAR-level scoping of EJB names (https://jira.jboss.org/jira/browse/JBPAPP-2124)
These have been done and are integrated into Branch_5_x. If approved I'll recut the release as a GA level and merge into JBPAPP.
S,
ALR -
14. Re: EJB3 managed component names and types
ips Jun 24, 2009 2:22 PM (in response to ips)Everything looks good to me. Please proceed with cutting a release and merging into the EAP branch.