-
1. Re: tranzact enqueue so slowly to JDBCPersist
adrian.brock Apr 17, 2003 8:39 AM (in response to hirotakanakano)There is no such method as
add(MessageReference[], ...)
The current implementation of the message cache
would make this hard to implement.
It does not guarantee (nor should it) that all
messages for a transaction are held in memory.
With lots of transactions/messages you would
very quickly get an OutOfMemoryException
Reliability is always more important than speed.
Your idea is a good one though. It would be more
optimal to persist the messages at transaction
prepare/commit when memory is not an issue.
Regards,
Adrian -
2. Re: tranzact enqueue so slowly to JDBCPersist
hirotakanakano Apr 17, 2003 9:41 AM (in response to hirotakanakano)Thanks your response.
This sample code is change by me.
I changed this code local and SpyXAResourceManager ,too.
afer make jar.
this code perfoms 1s process 2000tran .
I understand transactions from client is held memory.
This messege is sended by Queue client over sock network.
(transactions hold message,ack list)
This transactions is sended to Oracle by PersistanceManager .
1 tran is proceed by SQL over network .
this point is neck point.
I change markMessage and add method like under code.
public void markMessage(PreparedStatement stmt, long messageid, String destination, org.jboss.mq.pm.Tx txId, String mark)
throws SQLException
{
// LogInfo logInfo;
if (txId == null)
{
stmt.setNull(1, java.sql.Types.BIGINT);
}
else
{
stmt.setLong(1, txId.longValue());
}
stmt.setString(2, mark);
stmt.setLong(3, messageid);
stmt.setString(4, destination);
stmt.addBatch();
}
I think that changes code more 100tran per 1 SQL over network(executeBatch)
doesn't lost reliability and not occures OutOfMemory ?
Regards,
Adrian -
3. Re: tranzact enqueue so slowly to JDBCPersist
adrian.brock Apr 17, 2003 10:29 AM (in response to hirotakanakano)You would actually make the OutOfMemory
more likely.
The 2000 message body contents are stored both in
memory and in the statement's list of command
to execute as blobs.
Now multiply that by N clients doing the same thing.
If you have a working example, post a patch
to www.sf.net/projects/jboss
Regards,
Adrian