Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Prantik Biswas

Greenhorn
+ Follow
since Mar 22, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prantik Biswas

Ok...

Is there any way to unsubscribe any rouge subscriptions to a topic without actually using the JMS unsubscribe()

The problem is I had written quite a few test subscribers to test the app and the test subscribers no longer exist. But everytime a message is posted to the topic internally WSMQ creates multiple copies assuming the test subscribers will eventually read them. But this never happens and I am running out of message storage on the broker.
15 years ago
Thanks for the prompt reply folks.

Let me look into Sun's code and will post back my findings
15 years ago
I have a quick question on hashmap behavior.

Does the hashmap size ever decrease if has increased beyond its initial capacity?

In other words if initial capacity is 16 and I try to put 17 items in the hashmap size would increase to roughly 32. Now if I remove 16 items will the hashmap size drop back to 16??

thanks and regards
15 years ago
Folks,

Would really appreciate if some one could point out what I am missing here.
I have made sure that the topics are all created on the MQ Server. I have added the required jars in the class path. But, this is what I get and during debugging I figured out that "dest = (Topic) jndiContext.lookup(TOPIC_DEST);" is that line that trows the error. Any one ever encountered this before?

javax.naming.NamingException: Unable to retrieve actual object from queue. The exception was: javax.jms.MessageFormatException: MQJMS1061: Unable to deserialize object [Root exception is javax.jms.MessageFormatException: MQJMS1061: Unable to deserialize object]
at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:891)
at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:836)
at javax.naming.InitialContext.lookup(Unknown Source)
at test.SimpleTopicPublisher.main(SimpleTopicPublisher.java:66)
Caused by: javax.jms.MessageFormatException: MQJMS1061: Unable to deserialize object
at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4435)
at com.ibm.jms.JMSObjectMessage.getObject(JMSObjectMessage.java:261)
at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:882)
... 3 mo

Let me put the piece of code which generated this.

private static final String TOPIC_DEST = "SampleTopic";
private static final String JNDI_LOOKUP = "SampleTCF";

Context jndiContext = null;
try {
properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.mq.jms.context.WMQInitialContextFactory");
env.put(Context.PROVIDER_URL, "isistbd:1415/SYSTEM.DEF.SVRCONN");
jndiContext = new InitialContext(env);
} catch (NamingException e) {
e.printStackTrace();
}
TopicConnectionFactory connectionFactory = null;
Topic dest = null;
try {
connectionFactory = (TopicConnectionFactory)jndiContext.lookup
(JNDI_LOOKUP);
dest = (Topic) jndiContext.lookup(TOPIC_DEST);
} catch (Exception e) {
e.printStackTrace();
}
16 years ago
We are looking to build a simple web service.
Running it inside Tomcat or WebSphere appears to be an overkill because the webservice is very lightweight (and Websphere or even tomcat are not).

Is there any production purpose "Standalone Webservice" � something that does not require a container, or a third party lightweight container.

thanks
thanks for replying...

Given a situation where the app could be designed using a controller servlet with say 50 helper classes or 50 individual servlets. Which one would be more preferable and why?
17 years ago
I didn't get the chance to go through previous posts so please bear with me if this has been asked before.

I just wanted to know how does increasing the number of servlets in a web app influence the performance of the web container. What would constitute a good design practice when it comes to deciding the number of servlets in your app.

thanks in advance
17 years ago