Discussion:
[openjms-developer] [ openjms-Bugs-949270 ] JmsServer(config) throws NPE
SourceForge.net
2004-05-06 15:24:52 UTC
Permalink
Bugs item #949270, was opened at 2004-05-06 11:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=949270&group_id=54559

Category: server
Group: v0.7.6
Status: Open
Resolution: None
Priority: 5
Submitted By: J Aaron Farr (jaaron_farr)
Assigned to: Nobody/Anonymous (nobody)
Summary: JmsServer(config) throws NPE

Initial Comment:
The JmsServer(Configuration config) constructor does
not properly initialize the configuration variables
which causes a NullPointerException to be thrown when
JmsServer.init() is called. Patches are attatched for
both the JmsServer and the ConfigurationManager (to use
the ConfigurationLoader when handling Configuration
objects instead of a file name).

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=949270&group_id=54559
SourceForge.net
2004-05-07 07:32:15 UTC
Permalink
Bugs item #949270, was opened at 2004-05-07 01:24
Message generated for change (Comment added) made by tanderson
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=949270&group_id=54559

Category: server
Group: v0.7.6
Status: Open
Resolution: None
Priority: 5
Submitted By: J Aaron Farr (jaaron_farr)
Assigned to: Nobody/Anonymous (nobody)
Summary: JmsServer(config) throws NPE

Initial Comment:
The JmsServer(Configuration config) constructor does
not properly initialize the configuration variables
which causes a NullPointerException to be thrown when
JmsServer.init() is called. Patches are attatched for
both the JmsServer and the ConfigurationManager (to use
the ConfigurationLoader when handling Configuration
objects instead of a file name).

----------------------------------------------------------------------
Comment By: Tim Anderson (tanderson)
Date: 2004-05-07 17:32

Message:
Logged In: YES
user_id=557161

The patch file only contains a patch for
ConfigurationManager, which I don't quite agree with - the
Configuration instance should be completely populated
before being passed to the JmsServer constructor.
I've applied a change to JmsServer to correct the NPE, on the
openjms_0_7_6_maint branch.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=949270&group_id=54559
J Aaron Farr
2004-05-08 23:25:32 UTC
Permalink
Post by SourceForge.net
Bugs item #949270, was opened at 2004-05-07 01:24
Message generated for change (Comment added) made by tanderson
Comment By: Tim Anderson (tanderson)
Date: 2004-05-07 17:32
Logged In: YES
user_id=557161
The patch file only contains a patch for
ConfigurationManager, which I don't quite agree with - the
Configuration instance should be completely populated
before being passed to the JmsServer constructor.
I've applied a change to JmsServer to correct the NPE, on the
openjms_0_7_6_maint branch.
Sorry about the patch being messed up. Not sure what happened.

I was trying to make sure that if you started with the same
configuration file that you would get the same results regardless of
which constructor you choose. This is only the case if you change the
ConfigurationManager since the ConfigurationLoader adds certain
defaults. Otherwise, embedded uses of JmsServer which unmarshal the XML
configuration file themselves will have to add those defaults on their own.

Example 1:

public static final void main(String args[]){
try{

FileReader reader = new FileReader(args[0]);

Unmarshaller stream = new Unmarshaller(Configuration.class);
AttributeExpander handler = new AttributeExpander(reader);

Configuration config = (Configuration) stream.unmarshal(handler);
JmsServer server = new JmsServer(config);
server.init();
}
catch (Exception ex) {
ex.printStackTrace();
}
while(true){
try {
Thread.sleep(100);
}
catch (InterruptedException ex1) {
ex1.printStackTrace();
System.exit(1);
}
}
}



Example 2:

public static final void main(String args[]){
try{

JmsServer server = new JmsServer(args[0]);
server.init();
}
catch (Exception ex) {
ex.printStackTrace();
}
while(true){
try {
Thread.sleep(100);
}
catch (InterruptedException ex1) {
ex1.printStackTrace();
System.exit(1);
}
}
}


If you give the same default openjms.xml file (ie- the one included with
the default install) to either of these programs you will get different
results unless ConfigurationManager is patched. In fact, the first one
will throw errors. I was trying to resolve that inconsistency.
--
jaaron <http://jadetower.org>
J Aaron Farr
2004-05-08 23:29:50 UTC
Permalink
Post by J Aaron Farr
If you give the same default openjms.xml file (ie- the one included with
the default install) to either of these programs you will get different
results unless ConfigurationManager is patched. In fact, the first one
will throw errors. I was trying to resolve that inconsistency.
I should add that not patching ConfigurationManager is fine but that the
difference should be noted in the javadocs at least. It will help
embedded applications of OpenJMS.
--
jaaron <http://jadetower.org>
Kulvir Bhogal
2004-05-13 01:25:55 UTC
Permalink
I had a couple of quick questions about how OpenJMS works in regards to durable subscriptions and message persistence.

When the JMS provider is storing messages for a durable subscriber that is not alive, where does it store messages? Is this done to disk, or all kept in memory?

Also, with message persistence, I see that a database can be configured. However, if it is not configured, does OpenJMS write to disk (some sort of log file) by default?

Looking forward to seeing your responses.

Thanks,

Kulvir

Loading...