-
1. Re: File-pm and Zero length files
genman Jun 15, 2004 11:57 AM (in response to theimmortal)
The File PM is not being actively maintained. You can still help contribute fixes to the JBoss team, however. Please take a look at the source code.
What is your operating system and Java version? -
2. Re: File-pm and Zero length files
theimmortal Jun 15, 2004 1:48 PM (in response to theimmortal)Solaris 8 and JDK 1.4.2.
-
3. Re: File-pm and Zero length files
genman Jun 15, 2004 7:25 PM (in response to theimmortal)
Could you post the stack trace?
If it's in this file:
src/main/org/jboss/mq/pm/file/MessageLog.java
Add a try { } catch { } clause in
protected void restoreMessageFromFile(TreeMap store, File file )
Have it catch the appropriate exception (IOException) and log an error rather than let it propagate. -
4. Re: File-pm and Zero length files
aparfeno Jun 18, 2004 12:46 PM (in response to theimmortal)Hi,
I've discovered a bug in file PM that may be the cause of the problem here. If you use queue name that has characters which are not legal for FS (for example: myqueue@home), PM will encode it the illegal characters
and create directory to store queue messages with that name (so instead of data/jbossmq/db/myqueue@home, it is data/jboss/db/myqueue%064home). When jboss starts up, PM fails to decode the name and therefore does not find that queue on the FS and thus assums that the queue did not exist.
So the simple workaround is to avoid FS-illegal chars in your queue/topic names!
Alex -
5. Re: File-pm and Zero length files
theimmortal Jun 29, 2004 5:01 PM (in response to theimmortal)We found that the problem had to do with our applications and JBoss shutdown. If JBoss is being shutdown while the applications are still running (sending messages, etc), then the messages are not flushed to disk properly; thus creating 0 length files.
Our fix was to change the machine's reboot sequence to shutdown our applications first, then shutdown JBoss. This does not solve the problem if JBoss goes down or someone *accidentally* (hahaha) shuts JBoss down.