Wednesday, February 3, 2010

Oracle and Sun What is the outlook for the Development Community

Today I went to java.sun.com and becuase well it was time to see what Oracle did to my old friends. I noticed a link which looked promising:

'
After clicking the which read: "Oracle + Sun: Overview and FAQ for the Developer Community", I got the following error:

Resource not found, please contact administrator.

I hope this is not a foreshadowing of what is coming....

Tuesday, December 8, 2009

JMX Lesson

JMX is an interesting technology which some of use to view vm metrics and to perform centralization of system attributes. In the last few days a new project was started to introduce JMX to a core set of components within my current project.

In this project a problem arose where a jconsole running could not connect to a JMX server running on a flavor of linux. I was able to resolve the issue and wanted to post the solution here so I won't forget and hopefully help someone else who may find themselves in the same spot.

The symptom of the problem is a JMX server running on windows and a jconsole running on windows works without any issue. Once you deploy the JMX server on linux and run a jconsole on windows you get the following error:

As you can see the problem seems a bit frustrating because there are no real reasons giving for the problem. So my first step was creating a logging.properties which I pulled the sample from Daniel Fuchs (Daniel has lots of good JMX information on his blog). My logging.properties looks like:

handlers= java.util.logging.ConsoleHandler.level=DEBUG
java.util.logging.FileHandler.pattern = java%u.log

java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter

java.util.logging.ConsoleHandler.level = FINEST

java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

// Use FINER or FINEST for javax.management.remote.level - FINEST is
// very verbose... //
javax.management.level=FINEST
javax.management.remote.level=FINER


Once I created the logging.properties I started the jconsole using the commandline:

jconsole -J-Djava.util.logging.config.file=c:\logging.properties (make sure you change the path to match your location). With logging on I noticed the stack trace with the following error:

FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi: ///jndi/rmi://19.16.14.15:9090/jmxrmi] failed to connect: java.rmi.ConnectEx ception: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect

Please notice the error contains a loopback address for the host. If your asking yourself how can this be since I explicitly asked to use 19.16.14.15, well the issue lies with how the jmx server looks up its own ip address. If your linux machine is not setup to use the proper named look up you end up with the /etc/host entry which by defualt is 127.0.0.1.

So, now that I have determined I need to get the stub to return to the client with the proper address I found a great forum post on the SUN Forum. The post had the same issue and provides a linux method to resolve the issue. Basically start the jmx server with the following jvm start up param:

-Djava.rmi.server.hostname=`ifconfig eth0.1:1|grep "inet addr:" | sed "s/inet addr://" | awk '{print $1}'`

what this does is make sure the JMX server knows what address to register with so when a request for the stub is made it uses the right IP address and not 127.0.0.1. Please run the command on your system before start up to make sure you get your IP address. You may have to leave the .1:1 off the eth0.1:1 if you are not using more than one IP.

Once I started the jvm with the above command I was able to connect from windows to the linux box.

Tuesday, June 30, 2009

No Need To Write The Parser

For the last 8-10 years I have witnessed the senseless time wasting of writing the same parsing code over and over and over and over. I have been on both sides of the exercise, the one saying we need to do it and the one saying can we do it differently.
Recently I was writing a simple engine to create a generic parsing engine configurable by either an xml document or property file. I was a few days into the project when, on eof my long time CTOs bonked me on the head and pointed me towards smooks (http://www.smooks.org).

Smooks is a generic parsing engine which can take a xml document, csv document, pojo and almost anything else you can think of and transform it into something else. I am currently in the process of creating a engine around smooks to take data from many different feeds and convert it into a proprietary format for consumption.

I am writing about this type of product, because I believe there are organizations out there which are starting these type of projects and using large heavy weight ETL tools when all they need is a little smooks!

Roque Martinez is a Enterprise Architect with experience in Financial, Insurance and Independent Software developement. Roque is the founder of RM Technology Systems LLC, www.rmtechsys.com and can be reached at rmartinez@rmtechsys.com.

Tuesday, March 3, 2009

PerformaSure® and GlassFish

All applications require a deeper understanding of what is happening under the hood. In comes Quest's product PerformaSure®. I recently have been working with an Insurance outsourcing company which made a intelligent choice to move from Weblogic and use GlassFish. I am sure there are "religious" individuals who will read this blog and have a different opinion. But, for the price and breath of products GlassFish is a better a choice.

Quest has not made a specific installation document for installing the x-agent for Glassfish on Solaris. I have pieced some different documents to come up with a successful installation. I will in the next few paragraphs outline my process. I would like to help anyone avoid my time waster.

  1. You need to install the PerformaSure® product. Make sure the user which GlassFish uses can also access the PerformaSure® installation.

  2. Execute
    sh "${PERFORMASURE_HOME}/scripts/preinstrumentor.sh" "${JAVA_HOME}"
    This is important because it will create a jar file in the bootstrap directory which will be need as a jvm entry. The output should like:

    makeboot
    preinstrument
    2009-03-03 16:06:33.451 INFO Loading Agent startup configuration from /opt/que
    st/PerformaSure4.4/config/agent.config
    2009-03-03 16:06:33.841 INFO PerformaSure 4.4.2 (Build PAS_442-20061219-0110)
    on SunOS uxapt06 5.10 Generic_137137-09 sun4u sparc SUNW,Sun-Fire-V245
    using Sun Microsystems Inc. Java HotSpot(TM) Client VM version 1.5.0_15-b04
    (extra info: mixed mode, sharing); Agent Type: Preinstrumentor
    2009-03-03 16:06:33.841 INFO Configured to connect to Nexus at
    NTQPP01:41705
    2009-03-03 16:06:34.060 INFO Connected to Nexus at NTQPP01:41705
    2009-03-03 16:06:34.812 INFO Agent started
    2009-03-03 16:06:34.812 INFO Creating bootstrap classes in
    /opt/quest/PerformaSure4.4/bootstrap/-apps-jdk1.5.0_15.jar
    2009-03-03 16:06:37.530 INFO Preinstrumentation complete
    2009-03-03 16:06:37.550 INFO Preinstrumentor Agent shutdown completed
    done

  3. There are four(4) jvm options you will need to add to the config. If you are running as a cluster it could be called Config1. If you are running as a single server use server config. Below is an image of the console and the parameters:








The jvm options look like:
  • -javaagent:/opt/quest/PerformaSure4.4/lib/performasure-agent.jar
  • -Dperformasure.debug=0
  • -Xbootclasspath/p:/opt/quest/PerformaSure4.4/bootstrap/-yourapps-SUNWapp9_1u2-jdk.jar
  • -Dperformasure.agent.appserverinfo=ServerName06:Generic:SunAS9
4. To ensure the changes are operational make sure to only start one instance first.


Below are the two sites which helped me get over my hurdle
http://developers.sun.com/appserver/reference/techart/performasure.html
http://antognini.ch/category/apmtools/performasure/

Roque Martinez is a Enterprise Architect with experience in Financial, Insurance and Independent Software developement. Roque is the founder of RM Technology Systems LLC, www.rmtechsys.com and can be reached at rmartinez@rmtechsys.com.

Wednesday, September 17, 2008

When Technologist Only Look To Protect

Being a veteran of a few failed startups, I have noticed one very common theme. Yes, the Chief Whatever spent too much on the marketing slideware. But, the technologist which were entrusted to deliver product to customers where more interested in making sure of the following:

1- Any bad stuff which happens, is not my fault
2- And my fiefdom and all if its minions can not be blamed for any wrong doing
3- I created the coolest and newest widget

The problem with this type if mindset is the whole point is missed. And that point is the customer does not care about who's fault it is or how cool! The customer wants to have what it needs to deliver to their end customers.

so, your saying how does a CEX avoid poor customer focus:

1- The CEX's of the company need to avoid any golden cows. These are the people who the CEX have trusted for many years. These golden cows need to be either removed form their positions of honor or held accountable for their actions. when the CEX surrounds himself with yes people or people he has run business with the CEX does not get the truth

2- CEXs need to pay attention to human resource actions especially terminations and resignations. A CEX can notice if a manager is not in a proper place by noticing a high number of
terminations and resignations. If a manager terminates a person then employs a person, then the new person leaves shortly after being hired. There is a problem! The manager may be a great technologist, but is not a leader or a manager.

3- CEXs need to look inward. If a CEX finds himself justifying actions of one of his sacred cows, they need to stop and think! Is the problem with my trusted operative.

What if your not a CEX, how do help your company change?

1- Stop doing items 1,2,3 from the first paragraph. Change your mindset to, what did I do wrong to have a dissatisfied customer? This is a major mindset change and one which may take an almost spiritual undertaking. As a technologist you take pride in your work, you put many hours in. How could I have done anything wrong? You didn't, your mindset was wrong!

2- Focus on the customer! Some may be saying I am too low level to have an impact. You just fell into the trap of 1,2,3! Being aware of your customer at the entry level all the way up to the CTO is imperative. If you are maintaining any part of a project, you are important!

3- Don't walk over the trash! Yes, if you find something that can be fixed, fix it! Please follow whatever process there is in place for releases etc. but fix it! Don't let the process be the excuse for you not taking care of your customer!

In conclusion, I know organizations are very complicated. But my whole point is don't let the organization stop you from caring about your customer. Focus on providing for the customer and you will be surprised how successful you will become.