General Launchpad thoughts

I continue my tips regarding OS X Lion. As I said in my OS X Lion walkthrough, Lion come with a very iOS-ish application launcher : Launchpad. Out of the box, it is automatically populated with every application you have and application you download from the Mac App Store are added there too.
Although I keep on thinking it is a useless feature for power users, newcomers will surely find this useful, and it will help switchers to find their applications. As I was cleaning my machine I tried to rearrange Launchpad by making folders and then I discovered that you can't easily remove a shortcut to an application (except the ones coming from the Mac App Store which are uninstalled when you remove their icons).

Let me remove things !

By digging around, I found that Launchpad stores its preferences in a SQLite database, that you can explore and manipulate using the sqlite3 command line program.
Please notice that the steps described here might make your Launchpad unusable, so please backup every file you change in case something goes wrong !

Update ! Easy technique, use Launchpad-Control which is a preference pane allowing to visually hide / show icons on Launchpad. I detail here the step involved for the records.

One thing annoying in Lion is the popup appearing when you long press a key (similar to the one present in iOS showing special characters).
I found a way to disable this by issuing a simple Terminal command :

defaults write -g ApplePressAndHoldEnabled -bool false

Replace false with true in this command if you want to bring it back, you might need to exit and relaunch an app for the parameter to take effect.
If you want to discover more parameters, don't hesitate to dig into built-in properties, that's the way I found this tip (the -g flag tells to lookup in the globaldomain)

defaults read [-g]

I have an issue for quite  a long time with web administration console in Glassfish 3.x. When I try to access it, I point my browser to http://127.0.0.1:4848, the first access shows me the usual "Web console is loading stuff", after a while, by looking at the log, I see the web administration is ready. I then hit refresh, it redirects me to http://127.0.0.1:4848/common/index.jsf with a (not so) beautiful 404 error !

The discovery

I found the workaround by telling myself, wait, it never asked me to login....

Let's try to hit http://127.0.0.1:4848/login.jsf, well, I got the usual login screen, I enter my login credential, and got redirected to http://127.0.0.1:4848/common/index.jsf.... but now it works ! (I tried looking at Glassfish sources to identify and narrow down the source of my problem, but with a quick lookup, I couldn't figure out where the things are supposed to be done...)

The Useful tip !

To make it short, bookmark or be used to access the web administration console for your Glassfish 3.x server via http://127.0.0.1:4848/login.jsf

!

I just wanted to make a small post regarding an issue I spent almost a day getting rid off. I have a quite typical web architecture :

  • jar module encapsulating business logic (EJBs)
  • war module providing front end web access
  • war module for web service access (using JAX-RS)

The headache

Each war module depends on the ejb-client counterpart present in WEB-INF/lib. The problem I faced is that my @EJB injections was raising ClassNotFoundExceptions. I tried bypassing automatic injection with manual JNDI lookups but the same errors occurred. Playing with the debugger I found that the jars present in lib folder were not added into the web application's classloader.

The workaround

I spent a lot of time trying many things to fix this and found out the trick by downloading Jersey's sample. You simply have to have a sun-web.xml with the following content :

<sun-web-app>
  <class-loader delegate="true"></class-loader>
</sun-web-app>

I hope it will help someone else!