[Design the new POJO MicroContainer] - New behaviour of AbstractMetaDataContext.isEmpty()
by kabir.khan@jboss.com
This code in AOPConstructorJoinpoint
| private boolean hasInstanceOrJoinpointMetaData(MetaData metaData)
| {
| if (metaData == null)
| {
| return false;
| }
|
| MetaData instanceMetaData = metaData.getScopeMetaData(CommonLevels.INSTANCE);
| if (instanceMetaData != null && instanceMetaData.isEmpty() == false)
| {
| return true;
| }
| //Check for method annotations
| return hasMethodMetaData(metaData);
| }
|
The instanceMetaData.isEmpty() check used to return false for the following case:
| @Test
| public class AnnotatedChild extends Base
| {
| public static boolean childInvoked;
| public void childOnly()
| {
| childInvoked = true;
| }
|
| public void baseOverridden()
| {
| childInvoked = true;
| }
| }
|
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| ...
| <bean name="AnnotatedChild" class="org.jboss.test.microcontainer.matrix.AnnotatedChild"/>
| </deployment>
|
It now returns true, this breaks loads of the aop/mc int tests.
The instanceMetaData.toString() method shows
| org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge@1286c00{[JVM=THIS, CLASS=org.jboss.test.microcontainer.matrix.AnnotatedChild, INSTANCE=AnnotatedChild, WORK=1209895]}
|
and stepping into the isEmpty() method, the retrieval/MemoryMetaDataLoader with ScopeKey:
[INSTANCE=AnnotatedChild] is empty, but it then calls isEmpty() on the parent MetaDataContext, which contains the following retrievals and associated SkopeKeys
| MemoryMetaDataLoader [WORK=1209895]
| MemoryMetaDataLoader [INSTANCE=AnnotatedChild]
| AnnotatedElementMetaDataLoader [CLASS=org.jboss.test.microcontainer.matrix.AnnotatedChild]
| MemoryMetaDataLoader [JVM=THIS]
|
The CLASS level one has annotations, so isEmpty() ends up returning false.
Is this a bug or should I be checking if it is empty another way?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105149#4105149
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105149
18 years, 4 months
[Design of EJB 3.0] - Refactor of load balance policy
by bstansberry@jboss.com
An FYI.
I'm about to implement a refactor of load balance policies as discussed on http://www.jboss.com/index.html?module=bb&op=viewtopic&t=120423. Basic goal is to create an LBP interface that doesn't leak the legacy Invocation class into the API. Basically, I'll:
1) Create a clean interface org.jboss.ha.client.loadbalance.LoadBalancePolicy
2) Existing o.j.ha.framework.interfaces.LoadBalancePolicy will extend this base interface to include the legacy methods that leak classes.
3) Will write parallel versions of the standard LBP impls (RoundRobin, etc) that only implement the clean interface. None of them needed the legacy methods to function.
4) Change the type of all references to the legacy interface with the clean interface (e.g. @Clustered, StatefulClusteredBeanProxy, StatelessClusteredBeanProxy, etc.) I've tested that clients with legacy versions of these classes on their classpath will have no trouble deserializing proxies if I do this, as long as the class of the actual serialized LBP impl is available to them.
All this is straightforward enough.
Bit awkward is the handling of the default value for @Clustered.loadBalancePolicy. Currently it's the legacy LoadBalancePolicy interface class. We need to change that to the new interface or we leak the old Invocation class.
Question is what do we do if people leave the default attribute value. A user leaving the default value basically is saying "let the container pick an impl". Currently the container picks the *legacy* impls of RoundRobin or FirstAvailable. Now we have a choice:
1) Pick one of the new impls. This will break existing clients who don't have the new clients on their classpath. (They can easily fix this by putting the new clients on their classpath or by changing their @Clustered annotation to specify the legacy impl).
2) Pick the same legacy impls as before. This forces new clients to include the legacy Invocation classes on their classpath.
My vote is for #1. Any other opinions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105146#4105146
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105146
18 years, 4 months
[Design of JBoss Web Services] - Re: [Productivity] Level 4 - Production
by alessio.soldano@jboss.com
"alessio.soldano(a)jboss.com" wrote : Anyway, generally speaking, I think the idea of having something like a WS log repository to query with different filters for getting information on both pre-defined and custom (the admin decides through the jmx-console) time period is definitively interesting.
Some further thoughts on the ws log repository idea; this could be directly linked to what is written here http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115661, that is in/out messages are captured by a RequestHandler as long as information about processing time, client IP and the receiving host. This data is then persisted (no data loss with server shutdown and/or redeployment, eventual support for cluster...). JMX-console allows to query those data and to start/stop log recording as long as setting how much info is to be saved. Query could even be based on the soap body, depending on how it is stored.
Converter to stardard log formats could perhaps be added to allow eventual batch analysis and creation of graphical statistics / table, etc.
Up to this, logs would be stack independent (Native, Metro, CXF). As far as I can see, adding more specific and interesting data (operation statistics, ws-security related info, etc.) could be possible with native stack, since it will require at least access to the metadata model. However this could be further investigated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105136#4105136
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105136
18 years, 4 months
[Design of POJO Server] - Re: Metamodel and collections
by anil.saldhana@jboss.com
"wolfc" wrote : java.lang.NullPointerException
| | at org.jboss.metadata.ejb.jboss.JBossAssemblyDescriptorMetaData.getPrincipalVersusRolesMap(JBossAssemblyDescriptorMetaData.java:360)
| | at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:159)
| |
| Code with an explicit check on null is twice as fast. So I would save 1ms for every ~100000 calls. :-)
|
| Seriously: the code in getPrincipalVersusRolesMap is too slow for per EJB call usage. I would rather see the reversed mapping being dynamically maintained in SecurityRolesMetaData.
You are right. That map needs to be generated one time during deployment and accessed multiple times. I see that you made the changes. Is this what you did?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105124#4105124
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105124
18 years, 4 months
[Design of JBoss Web Services] - JSR224
by scott.stark@jboss.org
So I go to download the http://jcp.org/aboutJava/communityprocess/mrel/jsr224/ spec to get the details of @WebServiceRef, and find there is no spec. Rather there is this:
anonymous wrote :
| STOP - PLEASE READ
| The JAX-WS 2.1 final specification uses and references the W3C WSDL Binding specification which was being defined in the WS-Addressing Working Group. The Binding spec was in the Candidate Recommendation stage ( and expected to go to Final Recommendation) when we did the final release of the JAX-WS specification, RI and TCK. Since then it has come to our attention that the Binding spec is not going to be made a Final Recommendation and will instead be replaced with an alternative specification. We believe we need to take corrective action to address this issue. Hence, we are temporarily removing access to the specification, RI and TCK to prevent any use of these until the specification issue is resolved. We apologize for any inconvenience caused.
|
| We plan to remove the dependence of the JAX-WS 2.1 spec on this "orphan" W3C spec asap and republish the specification along with the Reference Implementation and TCK as soon as possible.
|
How does this affect the metadata model?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105123#4105123
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105123
18 years, 4 months