[Design of POJO Server] - Re: VFS issues
by adrian@jboss.org
"scott.stark(a)jboss.org" wrote :
| When I originally prototype the vfs code, I did start out with URI. The problem was that you always had to go to the URL in order to get the io streams, or come up with another URI handler framework. Its a decision we need to make.
|
But isn't that the whole point. If the URI really is a URL
then the handler extends AbstractURLHandler and gets
(or it can reimplement it).
| public InputStream openStream() throws IOException
| {
| checkClosed();
| return url.openStream();
| }
|
But if it is not really URL based then the handler
has to provide its own implementation.
i.e. a mapping to the real resource it is trying to represent with the
more logical URI.
The real issue is whether you also need
to write a URLStreamHandler besides the virtual file stuff.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970399#3970399
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970399
19 years, 7 months
[Design of EJB 3.0] - Re: jboss.xml dtd with jboss service element?
by kapilanand
Well annotations can define the meta data ok, but i dont intend to use them for deployment related details.
Deployment descriptor is the right place for it.
For example I used jboss.xml for the local-jndi-name only and used annotations for Management interface, Local interface and declaring the class as service, but this hard-codes the servicename. I was trying to figure out a way to override the service name from jboss.xml, and that's why looking for the DTD.
Of course i can replace the annotation values in the source at the time of build , but that requires my code to be checked-out (writable), plus I dont know how the java5 enabled IDE behave on scanning the variable names instead of the valid values.
So even a hard coded deployment descriptor is of same category. If xdoclet is out of picture, i would prefer to store templates for deployment-descritors and populate them to generate packages for release.
In case you have a better idea, do let me know.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970397#3970397
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970397
19 years, 7 months
[Design of POJO Server] - Re: VFS issues
by scott.stark@jboss.org
"adrian(a)jboss.org" wrote : The AbstractVirtualFileHandler does have the reference,
| it is just via a virtual method: getRootURL();
|
| The idea is that we might want to support virtual files
| that are not directly URL based, but do provide a unique identifier.
|
Ok, so I need to write out the rootURL to be able to read it back in.
"adrian(a)jboss.org" wrote :
| In fact, the api should really be URI based to make this a real possibility.
| With only those handlers that are based on a real URL having
| a URI that can be used to recreate the URL.
|
| In anycase, don't you have a problem that each deserialized
| virtual file handler will end up in its own copy of the context?
| That is unless the locator holds some kind of a map of rootURL -> context.
|
When I originally prototype the vfs code, I did start out with URI. The problem was that you always had to go to the URL in order to get the io streams, or come up with another URI handler framework. Its a decision we need to make.
Yes, we would need a mapping in context factory to avoid explosion of vfs contexts on deserialization.
"adrian(a)jboss.org" wrote :
| Also, I think you should make VirtualFileHandler implement Serializable
| as a part of the intended contract rather doing it on each implementation.
|
No problem with that.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970393#3970393
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970393
19 years, 7 months
[Design of POJO Server] - Re: VFS issues
by adrian@jboss.org
The AbstractVirtualFileHandler does have the reference,
it is just via a virtual method: getRootURL();
The idea is that we might want to support virtual files
that are not directly URL based, but do provide a unique identifier.
In fact, the api should really be URI based to make this a real possibility.
With only those handlers that are based on a real URL having
a URI that can be used to recreate the URL.
In anycase, don't you have a problem that each deserialized
virtual file handler will end up in its own copy of the context?
That is unless the locator holds some kind of a map of rootURL -> context.
Also, I think you should make VirtualFileHandler implement Serializable
as a part of the intended contract rather doing it on each implementation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970370#3970370
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970370
19 years, 7 months