NetBeans Fail
It only happens on my windows workstation, but NetBeans will randomly fail to indicate in the left navigation that there are problem classes that won’t compile. So annoying.
Java 1.6 + NetBeans 6.5 + OSX
I hadn't actually had a real need to force use of Java 1.6 yet. I did have a Java platform definition in NetBeans for 1.6 and would use that. But recently, my project has become more 1.6 heavy and I've had to switch to a JDK 1.6 source and binary format.
I found a very useful blog post that explained the upgrade here: http://point2blog.wordpress.com/2009/02/17/defaulting-to-jdk-16-in-netbeans-65-on-osx/
This is the relevant excerpt from the blog post by Damien Gabrielson:
Locate the NetBeans config file, typically located at “/Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans/etc/netbeans.conf” and open the file in your favourite editor Set the “netbeans_jdkhome” parameter to the JDK 1.6 home directory (ie. netbeans_jdkhome=
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home)
But that wasn't good enough for my use. I am developing a web application that runs on the Glassfish application server. That too needs to be running Java 1.6. The fix is easy:
- Open the "asenv.conf" file. In my case, it can be found at: /Applications/NetBeans/glassfish-v2ur2/config/asenv.conf
- Set the "AS_JAVA" parameter to the Java 1.6 directory. My entry reads:
- AS_JAVA="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home"
Java EE / JAAS Night Terrors
Working with JavaEE 5 brings up a lot of new challenges when developing an enterprise level web app. The first issue I noticed is the absolute lack of experience for those in the job market when it comes to EJB3 and JavaEE 5.
But lately, I too am struggling to figure out the right way to put these "standardised" Java technologies into play. So far it's like inviting the school bully and his cronies to your back yard 12th birthday party, as well as the lame/runt kids, and trying to get them all to play Pinochle and not fighting.
The past few weeks it's been the JAAS struggle. Open source frameworks like jGuard might be able to help me, but the end result is that my architecture is a bit too complicated.
The real problem is with regards to web services, specifically trusted services. The SOAP client takes on a JAAS role, but based on other session information will assume another user/role. It's a headache and there's very little on Google.
I'll follow up on this later.
