[JBoss Portal] - Memory leak in JBoss portal 2.4
by sandeeppujar
Version: Jboss Portal 2.4.0
We suspect possible memory leak in this release.
We did memory profiling for this version using Jprobe. Below is a detailed memory report.
Summary of profiling:
Test details:
1. A simple page with only one portlet (user portlet) was created and was hit repeatedly using JMeter.
2. A snap shot (SNAP1) was taken when the Jboss server was up and was taking requests. Memory was around 60MB mark
3. Total requests around 24,000. Total time: 30 mins
4. A snap shot (SNAP2) was taken again, when memory was at 90MB mark.
5. Forced GC and another snap shot (SNAP3)taken. After GC the memory usage came done, but there was still a considerable increase.80 MB
Has anybody seen this issue ?
Here are the differences in memory in Snap shots taken.
Diffrence between SNAP1 and SNAP2
Package Class Count Memory
Overall Difference 595,775 28,330,440
java.util Hashtable$Entry [ ] 66,697 (huge) 3,730,832 (huge)
java.util HashMap$Entry [ ] 39,780 (79.3%) 3,422,328 (82.2%)
Diffrence between SNAP1 and SNAP3
Package Class Count Memory
Overall Difference 442,350 21,832,800
java.util Hashtable$Entry [ ] 53,212 (huge) 2,975,672 (huge)
java.util HashMap$Entry [ ] 19,177 (79.3%) 2,538,056 (82.2%)
I can send the snap shot difference files if need be, I could not find a quick way to put the files here.
Thanks,
Sandeep
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974679#3974679
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974679
19 years, 7 months
[Beginners Corner] - How do I communicate with an openjms server
by dheth
I have an application that uses JNI to execute some legacy code I wrote a million years ago. It is not reentrant so I prefer to execute it outside of jboss. I have implemented this inside jboss and it works there but has concurrency issues that can really cause problems with jboss.
I can bring up an openjms server on port 6969 (i know i am a cad) and I can execute my stuff via queue on this server. I am able to run an example on my openjms server but I can't for the life of me figure out how to configure this properly so I can connect to the openjms server via jboss.
I have a feeling that this is a problem with adding some jndi configuration to the following files:
jms-ds.xml
standardjboss.xml (possibly)
Could someone help me out here on what the steps are to get this working?
Below is the send code I am using inside jboss.
public static String sendMyMessage(Serializable payload, String connectionFactoryJndiName, String destinationJndiName) throws JmsProducerException
{
String replyString = null;
String result;
Context jndiContext = null;
QueueConnectionFactory factory = null;
QueueConnection connection = null;
QueueConnection Rconnection = null;
String factoryName = "openJMSProvider";
String destName = "ReadResults";
String modelName = null;
String xmlName = null;
boolean runQuickLook = false;
Queue dest = null;
Queue queueDest = null;
QueueSession session = null;
QueueSession Rsession = null;
QueueSender sender = null;
String text = "";
boolean runTest = false;
Queue clientQueue = null;
try
{
System.out.println("1 Here");
jndiContext = new InitialContext();
// look up the ConnectionFactory
System.out.println("2 Here");
factory = (QueueConnectionFactory)jndiContext.lookup(factoryName);
// look up the Destination
System.out.println("3 Here");
dest = (Queue)jndiContext.lookup(destName);
// create the connection
System.out.println("4 Here");
connection = factory.createQueueConnection();
// create the session
System.out.println("5 Here");
session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
// create the sender
System.out.println("6 Here");
sender = session.createSender(dest);
// Create Receiver Connection
System.out.println("7 Here");
Rconnection = factory.createQueueConnection();
Rsession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
clientQueue = Rsession.createTemporaryQueue();
//clientQueue = Rsession.createQueue("PAFSClientListenerQueue");
// clientQueue = (Queue)jndiContext.lookup("PAFSClientListenerQueue");
// clientQueue = (Queue)jndiContext.lookup("ReadResults");
// start the connection, to enable message sends
connection.start();
Message message = session.createObjectMessage(payload);
message.setJMSReplyTo(clientQueue);
sender.send(message);
Message msg = null;
String messageID = message.getJMSMessageID();
String myFilter = "JMSCorrelationID = '" + messageID + "'";
QueueReceiver qReceiver = null;
qReceiver = Rsession.createReceiver(clientQueue, myFilter);
System.out.println(" Wait for reply msg...");
Rconnection.start();
msg = qReceiver.receive(15000);
if (msg == null)
{
replyString = "No reply message retrieved, queue timeout\n";
result = "No reply message retrieved, queue timeout\n";
}
else
{
if (msg instanceof TextMessage)
{
replyString = ((TextMessage)msg).getText();
result = "Reply Success";
}
else
{
replyString = "Reply not text message";
result = "Reply not text message";
}
}
System.out.println(" Server reply: " + result + "\n Server Result: \n" + replyString);
} // end of try
catch (JMSException exception)
{
exception.printStackTrace();
}
catch (NamingException exception)
{
exception.printStackTrace();
}
finally
{
// close the context
if (jndiContext != null)
{
try
{
jndiContext.close();
}
catch (NamingException exception)
{
exception.printStackTrace();
}
}
}// end of finally
// close the connection
if (connection != null)
{
try
{
connection.close();
}
catch (JMSException exception)
{
exception.printStackTrace();
}
}
if (Rconnection != null)
{
try
{
Rconnection.close();
}
catch (JMSException exception)
{
exception.printStackTrace();
}
}
return replyString;
} // end of method
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974675#3974675
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974675
19 years, 7 months