OceanTara Code Blog

November 24, 2008

Monitor JavaServiceWrapper with JMX

Filed under: JMX, JavaServiceWrapper, Spring — chris @ 11:34 pm

JavaServiceWrapper is a useful library that allows you to expose a java application as a windows Service. Note: 64bit install of JavaServiceWrapper is not free, you got pay ~75 per server.

JavaServiceWrapper can be monitored via JMX. The following code shows how to expose it through Spring configuration.

<bean id="wrapperManager" class="org.tanukisoftware.wrapper.jmx.WrapperManager" />
 
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
     <property name="beans">
          <map>
               <entry key="JavaServiceWrapper:service=WrapperManager" value-ref="wrapperManager" />
          </map>
     </property>
</bean>

November 23, 2008

Install new font Windows XP

Filed under: Windows — chris @ 7:35 pm
  1. Start > Control Panel > Fonts
  2. Click File > Install New Font
  3. Navigate to the folder with the new fonts
  4. Select the font
  5. OK

http://www.myfonts.com/support/help_install_win.html

November 22, 2008

Use DefaultMessageListenerContainer instead of jmsTemplate

Filed under: ActiveMQ, JMS, Spring — chris @ 8:21 pm

The code examples on the ActiveMQ and Spring JMS sites use a straightforward jmsTemplate.receive() call. I found this to be very unstable. It would frequently leave orphaned messages in a queue that would never be picked up.

I moved to a DefaultMessageListenerContainer.java and most of my problems were solved. Here’s a sample code:

(more…)

November 21, 2008

Intro First Post

Filed under: General — chris @ 9:55 pm

This blog is a simple collection of resolutions to problems I come across in everyday development. This blog is a just a small way to repay the great debt I owe to all the anonymous coders who have posted solutions across forums, mailing lists, blogs, websites and more.

Java, Python, SQL and related technologies are the focus.

Powered by WordPress