[Design of POJO Server] - LinkHandler - small fixes
by alesj
I added a fis.close() in LinkHandler:
| public LinkHandler(FileSystemContext context, VirtualFileHandler parent, File file, URI uri)
| throws IOException
| {
| super(context, parent, file, uri);
| // Read the link info from the file
| FileInputStream fis = new FileInputStream(file);
| try
| {
| links = VFSUtils.readLinkInfo(fis, file.getName());
| }
| catch (URISyntaxException e)
| {
| IOException ex = new IOException();
| ex.initCause(e);
| throw ex;
| }
| finally
| {
| fis.close();
| }
| }
|
and there should be some 'for loop' breaking in VFSUtils
| public static void parseLinkProperties(InputStream is, List<LinkInfo> info)
| throws IOException, URISyntaxException
| {
| Properties props = new Properties();
| props.load(is);
| // Iterate over the property tuples
| for(int n = 0; ; n ++)
| {
| String nameKey = "link.name." + n;
| String name = props.getProperty(nameKey);
| String uriKey = "link.uri." + n;
| String uri = props.getProperty(uriKey);
| // fixme - should break this 'for loop'
| if (name == null || uri == null)
| {
| break;
| }
| LinkInfo link = new LinkInfo(name, new URI(uri));
| info.add(link);
| }
| }
|
Scott, I hope this is ok with you?
Rgds, Ales
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970608#3970608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970608
19 years, 7 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Semantics of no local for a durable subscription
by timfox
Normally, if a message consumer is created with "no local" = true, then it won't receive any messages sent to it on the same connection the consumer is receiving on.
Durable subscriptions also can be created with "no local" specified, but this is a bit odd, since if a create a surable subscriber with no local = true, then close the subscriber, the subscription will still exist (since it is durable), but now what does no local mean, since it doesn't have a receiving connection?
Should it, or should it not receive a message from a particulat connection.
I think the only safe thing here is for the subscription to always receive messages irrespective of which connection they came from, and to filter them out on the receive.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970603#3970603
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970603
19 years, 7 months