[Design the new POJO MicroContainer] - Re: VFS and directory handling
by alesj
"wolfc" wrote : It's PersistenceUnitInfo that has the responsibility to be spec compliant, but it's VFS that has to provide the facilities to enable it to do so.
What does JPA expect to get in the case of nested jar?
It's neither file or jar.
OK, not file is obvious.
>From the spec:
anonymous wrote :
| .. other URL from which an InputStream in jar format can be obtained.
|
In our case this could be it.
If they then did this
| ZipInputStream zis;
| if (is instanceof ZipInputStream)
| zis = (ZipInputStream)is;
| else
| zis = new ZipInputStream(is);
|
But this would mean that the URL returned had to be VFS based - so that VFSURLConnection would kick in, pointing to nested jar. Which then returns itself as ZipInputStream.
But there is another catch.
Imagine you have that jar in exploded form.
How do you then know weatehr it's a nested jar or just plain dir?
Since for plain dir this does the trick:
| String urlString = url.toExternalForm();
| if (urlString.startsWith("vfs"))
| url = new URL(urlString.substring(3));
|
And we're back to Scott's description:
"scott.stark(a)jboss.org" wrote :
| This is the same situation that exists without the vfs for exploded vs packed jars. The only difference without the vfs is that the url prefix is probably jar: for packed, file: for exploded. There is no generic solution I can see
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154256#4154256
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154256
15 years, 12 months
[Design the new POJO MicroContainer] - Re: Multiple parsing implementation in RARDeployer
by vickyk
"alesj" wrote :
| OK, good point - backcompatibility.
| I'll put that method back.
And here I have the passing test ;)
test:
| [delete] Deleting: /tmp/test.log
| [junit] Running org.jboss.test.jcaprops.test.GoodrarUnitTestCase
| [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 4.101 sec
| [junit] Running org.jboss.test.jcaprops.test.JBossRaXmlOverrideUnitTestCase
| [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.113 sec
| [junit] Running org.jboss.test.jcaprops.test.UpperGoodrarUnitTestCase
| [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 2.872 sec
|
| BUILD SUCCESSFUL
Let me run all the jca tests now .
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154240#4154240
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154240
15 years, 12 months