Hi!
I am trying to send into the NMR 2000 messages in a row but ESB seems stuck
after 1000 messages.
My design is the following :
CXF-BC -> CXF-SE -> FileSender

So a SOAP Client is sending 2000 times the same request (in a simple loop,
so no multithread) and in the CXF-SE here is method called :

Here is the code :

public void sendFile(String filename, byte[] fileContent, String deviceCode,
int operatorCode) {
        filename = operatorCode + "-" + deviceCode + "-" + filename;
        try {
            InOnly exchange  = getClient().createInOnlyExchange();
            exchange.setService(m_incomingService);                 
            ServiceEndpoint endPoint =
getClient().getContext().getEndpoint(m_incomingService,
m_incomingSenderEndpoint);
            exchange.setEndpoint(endPoint);
            NormalizedMessage messageToSend = exchange.getInMessage();
            messageToSend.setProperty(DefaultFileMarshaler.FILE_NAME_PROPERTY,
filename);
            DataSource fileSource = new ByteDataSource(fileContent);
            DataHandler handler = new DataHandler(fileSource);
            messageToSend.addAttachment(DefaultFileMarshaler.FILE_CONTENT,
handler);
            getClient().send(exchange);
        } catch (Exception e) {
            m_gLogger.error("Error sendfile : filename " + filename + " 
deviceCode
= " + deviceCode + " operatorCode = " + operatorCode, e);
        }
    }

 private ServiceMixClient getClient() throws Exception {
        if (m_client == null) {
            ClientFactory factory = (ClientFactory) new
InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
            m_client = factory.createClient();
        }
        return m_client;
    }



I tried to change the values into servicemix.conf like this (without
success) :

servicemix.corePoolSize    = 64
servicemix.maximumPoolSize = 1280
servicemix.queueSize       = 2560

Can you explain me why the ESB freezes? When it happens I have to restart
the ESB.. and all the messages pending are lost...
Where am I wrong? Did I forget to free a resource?

If  I replace the code above but a simple copyFile into the CXF-SE it works
fine...



-- 
View this message in context: 
http://old.nabble.com/Can%27t-send-2000-messages-into-the-NMR-%3A-ESB-is-stuck-after-1000...-tp26269556p26269556.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to