From: <bil...@jb...> - 2005-04-28 13:59:25
|
"ad...@jb..." wrote : "ad...@jb..." wrote : | | But there is a big assumption that class resolution and/or not yet deployed classes | | isn't going to be cause problem. | | | | I think this is virtually certain by the way, but mostly in use cases that | involve either our own core services or where one top level deployment is | referencing another and hot deployment is required. | | In fact, without this knowledge, automatic redeployment of related top level deployments | because they share a classloader space becomes very difficult, if not impossible. | | And we are back with the all the stupid forums questions about ClassCasts, etc. Besides the ammount of effort it would take to implement this, do you really think this would ever perform well? Not only do you have to analyze the class and create parallel java.lang.reflect datastrucutres (which takes an absorbent amount of time), but what if the component does dynamic class loading? Because of has, hasfield, and annotations, AOP needs a lot of the information of the structure of a class so I don't see much optimization that can be done here. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875774#3875774 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875774 |
From: <ad...@jb...> - 2005-04-28 14:25:07
|
"bil...@jb..." wrote : | Besides the ammount of effort it would take to implement this, do you really think this would ever perform well? Not only do you have to analyze the class and create parallel java.lang.reflect datastrucutres (which takes an absorbent amount of time), but what if the component does dynamic class loading? | | Because of has, hasfield, and annotations, AOP needs a lot of the information of the structure of a class so I don't see much optimization that can be done here. First, I'm not saying we do all the effort now, especially if we have known performance problems. My concern (as I said earlier) is that it does not become impossible, e.g. because we are locked into an api that requires the classes loaded. Like you I develop iteratively, so the first implementation will be based on manifest references (this jar needs this other jar) and package demands to capture non-obvious dependencies. | <deployment> | <demand type="package">com.acme.blah</demand> | etc. | this will solve most problems for the initial bootstrap, and force a full teardown of the deployment and restart. But there are other requirements (down the road) that make this "belt and braces" approach undesirable. 1) Near seemless redeployment (redeploy in the background then cutover the gateway to the service, e.g. the jndi binding/socket or whatever) 2) Transactional redeploy (similar to 1 - but only do the cutover when all machines/services are sucessfully redeployed). 3) etc. Fundamentally, it is being able to spot the difference between doing a full redeploy because the classes changed (redeploy the jdbc driver) and an almost instantaneous cutover if you just change config (the datasource). Although the jdbc driver is a bad example since you are hardly ever going to switch driver versions on a running machine unless you are developing one. Other more user orientated examples are not. Finally, I don't necessarily need all the ClassInfo to do this, just the ability not to the load class. We mainly went down the ClassInfo road because it gives an extended reflection model that could be used by both AOP and MC. If it is bad, lets replace it with something else. Finally 2, I also don't believe that the performance problems are something that cannot be overcome. The JDK does a pretty good job at analysing byte code (probably doing more work than javassist) in a performant fashion. This is all moot for 4.0.3 since the JMX MC will be handling classloading. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875782#3875782 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875782 |
From: <ad...@jb...> - 2005-04-28 14:28:27
|
Incidently, I would prefer the AspectAdapterFactory had a similar api to the others in the container model: | public interface ClassAdapterFactory | { | ClassAdapter getClassAdapter(String name, ClassLoader cl) throws ClassNotFoundException; | ClassAdapter getClassAdapter(Class clazz); | } | Then the underlying implementation can choose whether it actually needs to load the class on the first method. i.e. whether classloading is required is then a quality of implementation detail. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875783#3875783 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875783 |
From: <sco...@jb...> - 2005-05-01 15:36:14
|
So JDK6 is thinking about including a standard ability to process annotations outside of a running jvm: JSR 269: Pluggable Annotation-Processing API http://www.jcp.org/en/jsr/detail?id=269 Relevant to this dicussion would be the ability to process annotations using the com.sun.mirror.* apis without loading classes. Has anyone looked at using these? http://java.sun.com/j2se/1.5.0/docs/guide/apt/mirror/overview-summary.html View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3876063#3876063 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3876063 |
From: <ad...@jb...> - 2005-05-02 14:17:28
|
There was a discussion before (in the AOP forum?) about APT. It is not really designed for what we want to do. One major drawback was that it was singlepass/singleclass if IIRC. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3876141#3876141 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3876141 |
From: <ad...@jb...> - 2005-05-02 14:21:50
|
Having said that, a CodeDOM like in .NET where you can pre-analyse code to see what it needs and modify it (annotations/interfaces/mixins) is pretty much what we need. At least for the MC. General AOP has more requirements. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3876142#3876142 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3876142 |
From: <sco...@jb...> - 2005-05-02 15:44:15
|
APT combined with the Java Compiler API effort: http://www.jcp.org/en/jsr/detail?id=199 which is also being considered for jdk6 I would think be providing that info. I guess the big mismatch here is that these are source based tools and we really need bytecode based tools. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3876157#3876157 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3876157 |