I tried to get the ide test working for embedded inside Eclipse
to understand how Bill's assembly vfs stuff works.
(Aside - the public interface for these classes shouldn't be in org.jboss.vfs.plugins :-)
Problems found so far:
1) Resources from the ejb3 testsuite were leaking into the embeded project.
In particular jndi.properties
2) The ejb3-interceptors-aop.xml is out-of-date
3) The default ejb3 persistence properties was missing
4) jboss-local-jdbc.rar was missing
5) The jca stylesheet was in the wrong place
6) There were many missing jars from the classpath
I've managed to fix all these (at least as they relate to the VFS test in the IDE)
although this shows just how stupid this solution is.
Why do we need to maintain multiple copies of configurations files and implementation
details all over the place. It's an impossible task to keep them in synchronization.
Finally, it's still broken, because Hibernate can't find the entities.
WARN 21-11 15:44:14,717 (?:?:?) -Unable to find file (ignored): vfs://11956562541581/ java.lang.RuntimeException: Cannot open stream at org.jboss.virtual.plugins.context.vfs.AssembledDirectoryHandler.openStream(AssembledDirectoryHandler.java:117) at org.jboss.virtual.VirtualFile.openStream(VirtualFile.java:216) at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getInputStream(VirtualFileURLConnection.java:117) at java.net.URL.openStream(URL.java:1007) at org.hibernate.ejb.packaging.InputStreamZippedJarVisitor.doProcessElements(InputStreamZippedJarVisitor.java:33) at org.hibernate.ejb.packaging.JarVisitor.getMatchingEntries(JarVisitor.java:240) at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:275)
It doesn't undertand the virtual file system and assumes its a zipped jar
which it fails to open - obviously.
This behaviour is not pluggable in hibernate. And the choice of how to scan
the jars/filesystem is even in a private method.
A policy decision in a private non-overridable method? :-)
Finally the test itself uses a jboss image in the main src checkout.
Which SVN tells me should be checked in! ;-)
[ejort@warjort embedded]$ svn status | grep \? ? src/main/resources/javase/tmp ? src/main/resources/javase/data