Hi,
have you just defined the global corePoolSize, maximumPoolSize and
queueSize properties in the conf/servicemix.properties file or do you
have defined component specific configuration ?
For your information, you can define the thread/queue configuration on
one component depending of the flow type used.
For example, for the file component, you can define something like:
<entry key="flow.seda.servicemix-file">
<bean
class="org.apache.servicemix.executors.impl.ExecutorConfig">
<property name="corePoolSize" value="32"/>
<property name="maximumPoolSize" value="-1"/>
<property name="queueSize" value="1024"/>
</bean>
I think that in your case, the global thread/queue configuration is
enough the CXF components (largely enough :)) but maybe not enough for
the file component.
Try to decrease the global properties values and define the thread
configuration specific for the servicemix-file component.
You can find more information about this here:
http://servicemix.apache.org/thread-pools.html
Regards
JB
jcamus wrote:
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...