-
1. Re: Deployment ClassPath and AOP
kabirkhan Mar 26, 2008 10:46 AM (in response to adrian.brock)I am not sure/can't remember why I made the "classes" bit. Maybe I was thinking there could be another for resources or something?
-
2. Re: Deployment ClassPath and AOP
kabirkhan Mar 26, 2008 10:49 AM (in response to adrian.brock)Regarding the ordering of classpath, I agree it should be at the start of the classpath. Although, as I mentioned somewhere else, this is not a problem in practice since only generated classes are written there. Woven classes are already in the classloader/classpools
-
3. Re: Deployment ClassPath and AOP
adrian.brock Mar 26, 2008 11:12 AM (in response to adrian.brock)So can we change it such that Module.getTempURL()
returns vfsmemory://guid/classes
that way somebody can decide the url comes from some other mechanism
that might not put things in a classes folder.
Also, I don't know whether you saw my comment, but the way
the vfsmemory handler is handling URL is brokens.
e.g.URL directory = new URL("vfsmemory://guid"); URL classes = new URL(directory, "classes"); URL classes2 = new URL("directory + "/classes");
classes.equals(classes2) is false which is wrong.
classes is actually the same as directory????
I think this is because you are doing your own manual parsing of the URL
instead of using the api as its meant to be used? -
4. Re: Deployment ClassPath and AOP
adrian.brock Mar 26, 2008 11:57 AM (in response to adrian.brock)"kabir.khan@jboss.com" wrote:
Regarding the ordering of classpath, I agree it should be at the start of the classpath. Although, as I mentioned somewhere else, this is not a problem in practice since only generated classes are written there. Woven classes are already in the classloader/classpools
Ok, I'll change this, it will come through in the next deployers release. -
5. Re: Deployment ClassPath and AOP
kabirkhan Mar 26, 2008 1:55 PM (in response to adrian.brock)"adrian@jboss.org" wrote:
Also, I don't know whether you saw my comment, but the way
the vfsmemory handler is handling URL is brokens.
I just commited the following to the MemoryTestCase, and it passes:public void testUrlHandling()throws Exception { URL directory = new URL("vfsmemory://guid"); URL classes = new URL(directory, "classes"); URL classes2 = new URL(directory + "/classes"); assertEquals(classes, classes2); assertTrue(classes.equals(classes2)); }
Did you mean something else? This test looks "weird" :-)"adrian@jboss.org" wrote:
I think this is because you are doing your own manual parsing of the URL
instead of using the api as its meant to be used?
Sorry, please elaborate a bit? -
6. Re: Deployment ClassPath and AOP
adrian.brock Mar 27, 2008 8:56 AM (in response to adrian.brock)
I just commited the following to the MemoryTestCase, and it passes:public void testUrlHandling()throws Exception { URL directory = new URL("vfsmemory://guid"); URL classes = new URL(directory, "classes"); URL classes2 = new URL(directory + "/classes"); assertEquals(classes, classes2); assertTrue(classes.equals(classes2)); }
Did you mean something else? This test looks "weird" :-)
Ok sorry. The problem is not subdirectories, it is the top directory.
i.e.
URL directory = new URL(new URL("vfsmemory://"), "guid");
Try changing this class
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java?revision=71306&view=markup
to do:URL vfsMemory = new URL("vfsmemory://"); URL dynamicClassRoot = new URL(vfsMemory, new GUID().toString());
-
7. Re: Deployment ClassPath and AOP
kabirkhan Mar 27, 2008 9:32 AM (in response to adrian.brock)This fails as well
URL httpA = new URL("http://classes"); URL httpB = new URL(new URL("http://"), "classes"); assertEquals(httpA, httpB);
junit.framework.AssertionFailedError: expected:<http://classes> but was:<http:/classes>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:282)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:71) -
8. Re: Deployment ClassPath and AOP
adrian.brock Mar 27, 2008 10:14 AM (in response to adrian.brock)Ok, I'll test it with the single slash when I can get it to build, see the other thread on
the CR8 pom. -
9. Re: Deployment ClassPath and AOP
adrian.brock Mar 27, 2008 10:33 AM (in response to adrian.brock)I see what the problem is, it's my misunderstanding.
You expect the GUID to be a host name in the url.
I've changed it to this and now it works. ;-)// protocol, host, file URL dynamicClassRoot = new URL("vfsmemory", new GUID().toString(), "");
-
10. Re: Deployment ClassPath and AOP
kabirkhan Mar 27, 2008 10:39 AM (in response to adrian.brock)Cool :-)