I’ve decided to move my blog from wordpress to blogspot. Why? I have to be totally honest – I want to be able to post AdSense and Amazon links on my blog. WordPress doesn’t allow me to do that. So, here is the new link benarchie.blogspot.com.
I’m Moving
January 3, 2010 by barciszewskiAndroid Development – So Easy, Yet Not So Easy
January 1, 2010 by barciszewskiI have recently started playing around with Android. Given the success of the Droid, Droid Eris, and what looks like a phone from Google, the NexusOne, I figure the Android is going to be either the number one or number 2 development platform for mobile devices. In either case, I want to be able to write apps for my Droid, which, I love.
So this week I have attempted to start development. I have read through the online documentation, which, in typical Google fashion, is fairly complete and detailed. The Android Developer Guide includes step by step instructions for installation of the SDK, Eclipse Plugin, and samples to get you programming quickly.
Of course, nothing is perfect. So here are a couple of issues with the tools.
- It appears that sometimes changed resources don’t get updated when the emulator is re-launched. Even though I’ve set the flag to Wipe User Data.
- I can get one version of the Google Maps sample to run correctly but not another. It seems that the Sample Tutorial on the Web site doesn’t work for 2.0 or 2.0.1 emulators on my machine, but the sample bundled with the toolkits do. To be honest, it appears that the only difference is WHERE the MapView is instantiated, but I am still a noob at this, so I am probably mistaken
Is this going to be enough to cause me to give up? Heck no. Even though these two items are frustrating, the toolkit is still well put together and I expect to be building apps in no time. My next posts will detail the building of an app.
GWT 1.6 JNDI and MS SQL configuratio
June 29, 2009 by barciszewskiWe’re now using GWT 1.6 at my work and we wanted to configure our applications to use JNDI. Although there are a few blog posts on this topic, each left out a bit of information that would have been helpful in getting the system to work. So I decided to put up a post here that goes step-by-step through my installation to help others who might have the same issues I did. Where ever possible, I will also reference the original posts I had found, in case you’d like to look there.
My setup
First things first – here are the tools I’m using
- Eclipse Ganymede with GWT Plugin
- GWT 1.6
- JTDS 1.2.2
Steps
1. Create jetty-web.xml file in war/WEB-INF/
2. Copy the following into jetty-web.xml
<?xml version=”1.0″?>
<!DOCTYPE Configure PUBLIC “-//Mort Bay Consulting//DTD Configure//EN” “http://jetty.mortbay.org/configure.dtd”>
<Configure class=”org.mortbay.jetty.webapp.WebAppContext”>
<New id=”website” class=”org.mortbay.jetty.plus.naming.Resource”>
<Arg>java:comp/env/jdbc/dataSourceName</Arg>
<Arg>
<New class=”net.sourceforge.jtds.jdbcx.JtdsDataSource”>
<Set name=”DatabaseName”>(databaseName)</Set>
<Set name=”ServerName”>(serverName)</Set>
<Set name=”User”>(User)</Set>
<Set name=”Password”>(Password)</Set>
</New>
</Arg>
</New>
</Configure>
3. Add Jetty Plus and Jetty Naming to your classpath
For this step, I created a new folder off the root of my GWT project called, “dependency”. Please note that jetty-naming has a dependency on activation and mail. So, the .jar files I have to import into my project are:
- jetty-plus-6.1.12.jar
- jetty-naming-6.1.12.jar
- activation-1.1.jar
- mail-1.4.jar
I want to deploy these applications to Tomcat, so I configured the launcher to include these on the classpath, Run->Run Configurations…->Classpath->User Entries->Add JARS…
While configuring the laucher, add the following under Arguments->VM Arguments
-Djava.naming.factory.initial=org.mortbay.naming.InitialContextFactory
4. In my code, I now get the connection with the following:
Context lContext = new InitialContext();
DataSource lDataSource = (DataSource) lContext.lookup(“java:comp/env/jdbc/dataSourceName”);
Connection connection = lDataSource.getConnection();
Alternate
If you want to use connection pooling or a different database, here is a link to the Jetty page that shows some sample configs: http://docs.codehaus.org/display/JETTY/DataSource+Examples
The most informative BLOG entry I found: http://humblecode.blogspot.com/2009/05/gwt-16-using-jndi-datasource.html
Dangerous AC Power
June 23, 2009 by barciszewskiLast night I had a real scare. I have work-issued Dell Inspiron notebook that I frequently use in the evenings. Last night, I went to do some work and when I plugged in the replacement AC Adapter, it LITERALLY blew up. Complete with column of fire(Albeit a little one), and burning ember.
It would not have been bad except that it was right in my face, so that little spark seemed a huge flame. I’m just glad that didn’t happen overnight, or I would Likely have more than an ember burn in my couch.
Hello world!
June 18, 2009 by barciszewskiWell, this first blog post kept the same title. Considering that I plan on blogging about programming and development, I thought the title appropriate. So, for this first post I thought I would introduce some of the topics I might blog about: GWT, ExtGWT, Hibernate, Spring. Any thoughts on what I should talk about would be welcome.