Hi Freeman,
I am using client.send. This is how I use it..
smxclient = SMXClient.getInstance();
Destination destination =
smxclient.createDestination(ORS_EIP_STATIC_RECIPIENT_SERVICE);
Message message = destination.createInOnlyMessage();
message.setProperty(REPLY_HEADER, Boolean.TRUE);
message.setContent(new StringSource(messageBody));
smxclient.send(message);
smxclient.done(exchange);
Eighty8 wrote:
>
> Perhaps related to my post about generateId( ) synchronized call is
> blocking. Only saw this with a profiler tool, but maybe you'd see it if
> you took a thread dump and analyzed it.
>
>
> subh wrote:
>>
>> I have a simple flow as below
>>
>> External message producer --> SMX JMS queue --> SMX Bean --> Camel router
>> --> SMX JMS Topic
>>
>> The servicemix bean has the business logic to generate the outgoing
>> message.
>> To forward the message onto the next service, I am using
>> ServiceMixClient.
>>
>> I am using the ClientFactory to create a instance of the client.
>>
>> ClientFactory factory = new
>> InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
>> ServiceMixClient client = factory.createClient();
>>
>> But after processing 1000 - 1500 messages, the Servicemix bean component
>> becomes very slow to respond. On checking the log, I see that the bean
>> thread count increases considerably and the expired threads are not
>> garbage collected.
>>
>> Due to this, all incoming messages are getting blocked which forces us to
>> restart the servicemix server. Once it is restarted, the processing
>> becomes very fast and we come to the same situation again in a day or so.
>>
>> Am I doing something wrong by using the ServicemixClient inside the bean?
>> If no, then what are the best practices for using the Servicemix client
>> class.
>>
>> Are there alternative ways to specify the "target service" from the SMX
>> bean endpoint?
>>
>> Any hint or suggestion would be helpful.
>>
>> I am using activemq5.3 and servicemix 3.3
>>
>> Regards
>> Subh
>>
>
>
--
View this message in context:
http://old.nabble.com/ServicemixBean-thread-issue..-tp27714350p27714450.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.