Thursday, January 19, 2012

Buzzin': Buzzwords and Technologies from the January 2012 SVJUG

Image from Memeburn.com
So many technologies you'll be buzzin'.  This article will briefly summarize the meeting and the technologies mentioned.

So the Silicon Valley Java User's Group had a great meeting on January 18th at the Googleplex.  It was on a fairly advanced topic, Heroku.  James Ward delivered it and delivered it well, it was a whirlwind tour-de-force of a microcosm of Java and other technologies.  Heroku itself was described as PaaS, Cloud + Polyglot and in the course of the session, many, many other buzzwords (it wasn't really "buzz" in that it was actual informative content and not empty hype) and technologies were mentioned.  So many that they need some explanation and so many explanations that they need categories.



I hope that you enjoy drinking from the fire hose!  You definitely will if you need to ramp-up on these things.  I hope you found some use here or followed some of the links.  At the very least if you were already familiar with the 80 technologies listed (YES!  EIGHTY!) then you deserve a pat on the back (and probably a hefty salary!)

Monday, December 19, 2011

Valhalla Koan: Logging Without Logging

OK, this isn't really a koan, because there is an answer.  The more mundane version of the question is, how do you make log statements to diagnose why your favorite logging framework isn't working.

Just as parents can learn from their children, those close to mastery can learn from the neophytes, System.out.println is usually acceptable (you're web-container may vary).

If you're using WebLogic 11g, their logging documentation can be just as confusing as a koan.  Fortunately, as a part-time hipster I'm really into their earlier work (i.e. their prior documentation actually makes sense).

So, to get to the point, if you want to use the WebLogic logging before you initialize your favorite like (like Log4j) you can:

  1. Use the simpler WebLogic APIs for logging until your main logger is working.
  2. You may have to have your WebLogic server use more logging statements (mine was set to only WARNs and above but all of my logging statements were INFO until I changed it).  You can do that by:
    1. Logging into the WebLogic Console.
    2. Going to Environment -> Servers.
    3. Select the server you want.
    4. Click on the Logging tab.
    5. Expand the Advanced section.
    6. Turning everything to DEBUG or TRACE. 
    7. Save your changes.
    8. Restart the server.
    9. Finally, redeploy your application.
  3. Then you can trigger the early logging statements and view them in the WebLogic Server Administration Console.
If you're familiar with Oracle and WebLogic products, you appreciate how this is as simple and straightforward as it gets.

Wednesday, December 14, 2011

My Technology Fail: Using JMeter for Integration Testing

Engineering Fail from MemeHumor.com
Please don't do what I did: I made my Maven build run JMeter, record all data retrieved (JMeter option) and then verified the data after as my integration test.

Please, just use HtmlUnit since it's designed for this to begin with.

Note that JMeter is great to use what it's made for: load testing.  Thanks to Manfred Reim for writing his blog post about HtmlUnit, it's what made me realize my mistake.

Friday, December 9, 2011

SpEL in JSF

I've been having an awful time getting SpEL to register in my JSF .xhtml pages.  I just want to do a simple

...

However, my project would give me an error saying that '(' was unexpected. This was despite the Spring Documentation saying that SpEL is the default expression language.

I made some head way when I put the following into my spring configuration xml:






This should work with JSF 2.0, but my project uses JSF 1.2 so I got a cast exception since JSF 1.2 uses the org.springframework.binding package instead.
The following should work with JSF 1.2 (I'll test this soon).




  
    
    
  
  
  

If you're using Spring Web Flow (SWF) then you'll need a different expression parser; use org.springframework.faces.webflow.FacesSpringELExpressionParser with the same constructor-args.
Note how it wraps the new SpelExpressionParser.

I've done thorough Google searches on this topic and found nothing, so as far as I can tell this is unique information!

Thursday, December 8, 2011

Old Dogs Must Learn New Tricks

An article at TheServerSide grabbed my attention violently: it was claiming that your professional "half-life" as a programmer is at 35.  This was immediately disturbing since it took me until 28 to really land my first professional programming job.

From reading the comments it seems that the consensus is that the person was basing his experience solely off of Google, who has a notorious youth-culture, and that if you keep your skills current you should be just fine.

Or, to put it another way, old dogs must learn new tricks to survive.

Tuesday, November 22, 2011

Views, Documents and Trinidad


So I got Apache Trinidad's partial page rendering (PPR, basically AJAX) to work, and learned about Trinidad in the process.

I was highly confused by <f:view>, <tr:document> and <trh:html> (and <trh:head> and <trh:body>).  As it turns out, you don't need f:view if you're using Facelets, so no need to worry about that.  The documentation about tr:document makes me think that it's a replacement for the top-level <html> tag, but it's really the top tag in a Trindad Component.  So, if you need to use Trinidad's PPR you want use the <trh:html>, <trh:header> and <trh:body> tags with a <tr:form> and THEN you are good to go.

Monday, November 21, 2011

The Eclipse .ini File

Quick post about the Eclipse's eclipse.ini file.

This one is usually used to either explicitly specify the JVM to use (so you won't have to worry about changes to JAVA_HOME breaking your Eclipse) or to pass arguments to the JVM being used (i.e. memory arguments usually).

The full list is pretty large.  The -noSplash option looks interesting, as well as an option to give your own image file for the splash screen.