Note to self “you cannot use dependency injection in helper classes”

So after wasting a lot of time fighting against the current, and my desire to use the beautiful and clean dependency injection features in EJB3, I am now using the old messy lookin context lookup for resources in my helper classes.

I saw some post about passing resources, but having issues with threading. Just a note to myself to not try this again.

A service to test your application with various HTTP codes

http://httpstat.us/

This is a service to get HTTP codes for testing how your. stuff handles various HTTP codes.

The service is real simple to use; add a call like:

http://httpstat.us/404

to see how your app handles a 404

There is a good list of codes here too

Use the Android SDK Emulator with Eclipse behind a Proxy

In the office we have a pretty stern internet proxy and I needed to test something from the Android Emulator using the network today, and therefore the Proxy. This seemed like a simple thing to do, and there are instructions for adding proxy information when launching the Emulator  on the Android Developer site (http://developer.android.com/guide/developing/tools/emulator.html#proxy). So I went into preferences for Eclipse, chose the Android preferences and sure enough, on the lunch tab there is a field for parameters when launching the Emulator. I added the proxy string there as per the document (-http-proxy user:pass@server:port) e.g.

-http-proxy http://user:pass@proxy.example.com:1234

but it did not seem to take. A little searching in some forums solved this however. I am adding it here with a title that matches what I was searching for via Google so that the next person can find it without reading a lot of forum threads.

The trick is that you need to add this info on for the project you are going to be running it from, and there is a convenient place to do so in Eclipse. With the project selected,  choose “Run” from the menu bar at the top, then “Run Configurations” This will show all the run configurations, and have the current project selected. You can also choose the Run/Configurations items from any project and select the correct one once inside. Once a configuration is chosen, choose the “Target” tab from the tabs on the right side of the Run Configurations dialog and look for the Text field labeled “Additional Emulator Command Line Options”. I had to resize the Dialog window to get this box to appear as there are no scrollpanes used there (I am using Linux version 3.5.2. of Eclipse). Below are a couple screen shots of these dialogs.



Recursive Grep Example

Nothing really needing explaining here, but wanted an example for doing a recrsive grep handy as I can never remember it.

 

grep -RH –include “*.java” TEXT_I_AM_LOOKING_FOR *

 

Well lets start then

Hello world. Well there is a start. Everything must start with that right? 

 

Okay, the purpose of this post is to tell you all why I have created this new blog. I have previously mingled my Family and hobbies (Art, Music, Bicycles) with tech talk and have decided to separate the two. As you can see from the title of this blog, this is not going to be the Hobby site. 

 

I hope you stop by from time to time to see what I have to contribute today, tomorrow and days++

 

j

Follow

Get every new post delivered to your Inbox.