Показаны сообщения с ярлыком java. Показать все сообщения
Показаны сообщения с ярлыком java. Показать все сообщения

понедельник, 20 октября 2014 г.

Update-me-now killswitch in Java 7

After Java 7 update 17 Sun/Oracle implemented a kill switch which prevents installed java working after compiled in specific date (roughly 3 months after release) displaing prompts ala

"This version of Java is not secure"

While it is usual to read every week announcements about new exploits in Java this sort of self punishment is very inconvenient in Corporate (aka no internet) environments.

There is a whole thread dedicated to prevent Java to display various Update me dialogs
 http://www.symantec.com/connect/forums/how-everyone-addressing-forced-java-dialog-java-update-needed-your-java-version-insecure

Of cource you must update Java, but all this prompts in Corporate environment is pointless because user does not have enough rights to Update java.

понедельник, 13 октября 2014 г.

Mule business event logging via ServerNotificationListener

Mule CE 3.5.0 does not have any sort of business monitoring. Only logs with lots of technical information.

So you must setup your own infrastructure, for example using Graylog2 or Logstash + Kibana.

But first of all how to get high level information about flows and events in your Mule ESB?

1) Do not init listeners via registry-bootstrap.properties as described in Start Me Oh So Gently

The MuleContext instance and internal NotificationManager and it`s Policy field will be overwritten later in process with new instance (this only applies to running in standalone mode, somehow running flow in IDE does not produce such behaviour)

2) Use standard syntax in your flow XML file:

<spring:bean name="logger1" class="class implementing MessageProcessorNotificationListener"/>
<spring:bean name="logger1" class="class implementing EndpointMessageNotification"/>

<notifications dynamic="true">
  <notification event="MESSAGE-PROCESSOR"/>
  <notification event="ENDPOINT-MESSAGE"/>

  <notification-listener ref="logger1"/>
  <notification-listener ref="logger1"/>
</notifications>

I recommend listening at least on these two events (MessageProcessorNotification and EndpointMessageNotification). The first one produces information about message being processed and sent to outbound endpoints. The second one generate event with information about message received from inbound endpoint.

3) Do the code to extract information from events

среда, 8 октября 2014 г.

Poor`s man jvisualvm on Windows 2008+

If running java processes as services on Windows 2008 and later, there is no way to profile them using jvisualvm - you can`t connect to them directly.

Yes, you can use - jmx, jstatd. But there is a way to gather performance data without all that fuzz.

Using psexec (from SysInternals) you can dump all performat data for all java processes with one command line:

psexec \\HOST -accepteula -u DOMAIN_USER -p DOMAIN_PASSWORD -h cmd /c for /f "tokens=1" %i in ('%JAVA_HOME%/bin/jps.exe') do jcmd %i PerfCounter.print

It uses jcmd for dumping all information. You must use the same DOMAIN_USER, DOMAIN_PASSWORD used for services. Do not run java services as LocalSystem!

This will produce output like this:

воскресенье, 5 октября 2014 г.

64-bit Windows binary of Tanuki Software Wrapper

On original site where is no way to download 64 bit version for Windows.

One, ofc, can compile it manually but you can save yourself a lot of hassle just getting the binary.

Today I discovered that OSS project Apache ActiveMQ binary distribution bundles win64 binaries with it.

So grab it from http://activemq.apache.org if you need win64 wrapper binaries.