<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-104781243427600828</id><updated>2024-09-04T15:07:37.963-04:00</updated><category term="java"/><category term="deployment"/><category term="links"/><category term="webservices"/><category term="psychology"/><category term="vaadin"/><category term="windows"/><title type='text'>Certified coffee addict coding with passion</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hofmanndavid.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-859433330271612011</id><published>2011-12-29T14:51:00.000-03:00</published><updated>2011-12-29T14:51:18.920-03:00</updated><title type='text'>Como medir la altura de un edificio ?</title><content type='html'>&lt;br /&gt;
Hace algún tiempo recibí la llamada de un colega. Estaba a punto de poner un cero a un estudiante por la respuesta que había dado en un problema de física, pese a que éste afirmaba con rotundidad que su respuesta era absolutamente acertada. Profesores y estudiantes acordaron pedir arbitraje de alguien imparcial y fui elegido yo.&lt;br /&gt;
&lt;br /&gt;
Leí la pregunta del examen y decía:&amp;nbsp;Demuestre cómo es posible determinar la altura de un edificio con la ayuda de un barómetro.&lt;br /&gt;
&lt;br /&gt;
El estudiante había respondido:&lt;br /&gt;
Llevo el barómetro a la azotea del edificio y le ato una cuerda muy larga. Lo descuelgo hasta la base del edificio, marco y mido. La longitud de la cuerda es igual a la longitud del edificio.&lt;br /&gt;
&lt;br /&gt;
Realmente, el estudiante había planteado un serio problema con la resolución del ejercicio, porque había respondido a la pregunta correcta y completamente. Por otro lado, si se le concedía la máxima puntuación, podría alterar el promedio de su año de estudio, obtener una nota más alta y así certificar su alto nivel en física; pero la respuesta no confirmaba que el estudiante tuviera ese nivel.&lt;br /&gt;
&lt;br /&gt;
Sugerí que se le diera al alumno otra oportunidad. Le concedí seis minutos para que me respondiera la misma pregunta pero esta vez con la advertencia de que en la respuesta debía demostrar sus conocimientos de física.&lt;br /&gt;
Habían pasado cinco minutos y el estudiante no había escrito nada. Le pregunté si deseaba marcharse, pero me contestó que tenía muchas respuestas al problema. Su dificultad era elegir la mejor de todas. Me excusé por interrumpirle y le rogué que continuara.&lt;br /&gt;
&lt;br /&gt;
En el minuto que lo quedaba escribió la siguiente respuesta: tomo el barómetro y lo lanzo al suelo desde la azotea del edificio, calculo el tiempo de caída con un cronómetro. Después se aplica la formula altura = 0,5 x aceleración x (tiempo al cuadrado). Y así obtenemos la altura del edificio.&lt;br /&gt;
En este punto le pregunté a mi colega si el estudiante se podía retirar. Le dio la nota más alta.&lt;br /&gt;
&lt;br /&gt;
Tras abandonar el despacho, me reencontré con el estudiante y le pedí que me contara sus otras respuestas a la pregunta.&lt;br /&gt;
&quot;Bueno, respondió, hay muchas maneras, por ejemplo tomas un barómetro en un día soleado y mides la altura del barómetro y la longitud de su sombra. Si medimos a continuación la longitud de la sombra del edificio y aplicamos una simple proporción, obtendremos también la altura del edificio.&quot;&lt;br /&gt;
&lt;br /&gt;
Perfecto, le dije, ¿Y de otra manera?. Si, contestó, éste es un procedimiento muy básico para medir un edificio, pero también sirve. En éste método, tomas el barómetro y te sitúas en las escaleras del edificio en la planta baja. Según subes las escaleras, vas marcando la altura del barómetro y cuentas el número de marcas hasta la azotea. Multiplicas al final la altura del barómetro por el número de marcas que has hecho y ya tienes la altura.&lt;br /&gt;
&lt;br /&gt;
Este es un método muy directo. Por supuesto, si lo que quiere es un procedimiento más sofisticado, puede atar el barómetro a una cuerda y moverlo como si fuera un péndulo. Si calculamos que cuando el barómetro está a la altura de la azotea la velocidad es cero y si tenemos en cuenta la medida de la aceleración de la gravedad al descender el barómetro en trayectoria circular al pasar por la perpendicular del edificio, de la diferencia de estos valores y aplicando una sencilla formula trigonométrica, podríamos calcular, sin duda, la altura del edificio.&lt;br /&gt;
&lt;br /&gt;
En este mismo estilo de sistema, atas el barómetro a una cuerda y lo descuelgas desde la azotea a la calle. Usándolo como un péndulo puedes calcular la altura midiendo su período de precesión.&lt;br /&gt;
En fin, concluyó, existen otras muchas maneras. Probablemente, la mejor sea tomar el barómetro y golpear con él la puerta de la casa del portero. Cuando abra, decirle &quot;Señor portero aquí tengo un bonito barómetro. Si usted me dice la altura de este edificio, se lo regalo.&quot;&lt;br /&gt;
&lt;br /&gt;
En este momento de la conversación, le pregunte sí no conocía la respuesta convencional al problema (la diferencia de presión marcada por un barómetro en dos lugares diferentes nos proporciona la diferencia de altura entre ambos lugares) evidentemente, dijo que la conocía, pero que durante sus estudios, sus profesores habían intentado enseñarle a pensar.&lt;br /&gt;
&lt;br /&gt;
El estudiante se llamaba Niels Bohr, físico danés, premio Nóbel de Física en 1922, más conocido por ser el primero en proponer el modelo del átomo con protones y neutrones y los electrones que lo rodeaban. Fue fundamentalmente un innovador de la teoría cuántica.&lt;br /&gt;
&lt;br /&gt;
(Archipopular crónica atribuida a Sir Ernest Rutherford, presidente de la Sociedad Real Británica y Premio Nóbel de Química en l908)&lt;br /&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/859433330271612011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/859433330271612011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/859433330271612011'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2011/12/como-medir-la-altura-de-un-edificio.html' title='Como medir la altura de un edificio ?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-1422627620824742503</id><published>2011-04-14T11:54:00.000-04:00</published><updated>2011-04-14T11:54:26.680-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="vaadin"/><title type='text'>Aplicaciones Web en Java con Vaadin</title><content type='html'>Estas son las diapositivas utilizadas en la presentacion de introduccion al framework Vaadin como parte de una serie de charlas dadas en el evento &lt;a href=&quot;http://blog.hdavid.org/2011/04/charlas-tecnicas-en-la-uaa.html&quot;&gt;FLISOL&amp;nbsp;2011 en Asuncion Paraguay&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;451&quot; src=&quot;https://docs.google.com/present/embed?id=dxcb82j_230cxf366gf&amp;amp;size=m&quot; width=&quot;555&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Voy a ir subiendo mas informacion sobre la utilizacion del framework como asi tambien estoy desarrollando una aplicacion un poco mas grande y completa para demostrar las mejores practicas en el desarrollo de aplicaciones grandes.</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/1422627620824742503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/1422627620824742503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/1422627620824742503'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2011/04/aplicaciones-web-en-java-con-vaadin.html' title='Aplicaciones Web en Java con Vaadin'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-1321605835884266341</id><published>2011-04-06T07:39:00.000-03:00</published><updated>2011-04-06T07:39:29.486-03:00</updated><title type='text'>Charlas Tecnicas en la UAA</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;En el evento FLISOL 2011 que se va a realizar este sabado 9 de Abril se presentaran varias &lt;a href=&quot;http://i1199.photobucket.com/albums/aa470/jbaezpy/Flisol2011/grilla4.jpg&quot;&gt;charlas tecnicas y talleres&lt;/a&gt; de programacion en la UAA. Ese dia hay varias cosas interesantes que pueden ver en el &lt;a href=&quot;http://coopsolpy.org/flisol-asuncion-2011/&quot; style=&quot;font-weight: bold;&quot;&gt;anuncio oficial&lt;/a&gt;. Aqui&amp;nbsp;comparto la lista de charlas y talleres que se van a dar. La entrada es libre y gratuita y como es&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;a href=&quot;http://coopsolpy.org/&quot;&gt;Coopsolpy&lt;/a&gt;&amp;nbsp;quien esta organizando el evento este año&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;, pueden seguir en su sitio cualquier actualizacion oficial que ocurra.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Saludos y nos vemos en el evento!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Charlas &lt;/span&gt;(resalto las referentes a programacion)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;09.30 - 10.30 Bienvenida e introduccion al Software Libre, Jose Cabrera&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;10.30 - 11.30 Mozilla Labs, Introduccion &amp;amp; Firefox 4, Sync, Eduardo Urcullu&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;10.30 - 11.30 Comparativa de navegadores, Aldo Medina&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;11.30 - 12.30 &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://rubyonrails.org/&quot;&gt;Ruby on Rails&lt;/a&gt; / Desarrollo Web&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;, Rafael Franco&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;11.30 - 12.30 Sugar showcase, Martin Abente&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;12.30 - 14.00 RECESO&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;14.00 - 15.00 &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Aplicaciones Web con &lt;a href=&quot;http://vaadin.com/&quot;&gt;Vaadin&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;, David Hofmann&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;14.00 - 15.00 Software libre y Accesibilidad, Felipe Nery Ibarra&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;15.00 - 16.00 &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Introduccion al I/O asincrono con &lt;a href=&quot;http://nodejs.org/&quot;&gt;NodeJS&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;, Cesar Rodas&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;15.00 - 16.00 Libre Office Paraguay, Alberto Gimenez&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;16.00 - 17.00 &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Introduccion a &lt;a href=&quot;http://developer.android.com/&quot;&gt;Google Android&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;, Christian Amado&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;Talleres&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;10.30 - 12.30 y&amp;nbsp;14.00 - 16.00 &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Desarrollo sobre Android/buenas practicas&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;, Christian Amado&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;10.30 - 12.30 y 14.00 - 15.30 &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Introduccion a &lt;a href=&quot;http://www.sencha.com/products/extjs/&quot;&gt;ExtJS&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;, Javier Cardozo&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;A DEFINIR &lt;b&gt;Java para Moviles&lt;/b&gt;, Roger Armoa&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/1321605835884266341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/1321605835884266341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/1321605835884266341'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2011/04/charlas-tecnicas-en-la-uaa.html' title='Charlas Tecnicas en la UAA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-8860945317295244019</id><published>2009-11-27T22:21:00.004-03:00</published><updated>2009-11-28T11:26:50.057-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="links"/><category scheme="http://www.blogger.com/atom/ns#" term="psychology"/><title type='text'>Dose of learning, not only technical aspects matters</title><content type='html'>When I started as a programmer, technical matters had the most weigh of my interest, but the more I advance in my career the more I see social and humane aspects of software development as more important than pure technical ones. Some of these aspects turn out to be about dealing with others, having an always-tuning process that fits in your organization, to have a good empowerment policy and stuff like that, probably I am missing a lot of other aspects, but the idea is that not everything is just coding ...&lt;br /&gt;
&lt;br /&gt;
Here&#39;s a couple of links to share while consuming the Internet :)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A way to &lt;/b&gt;&lt;a href=&quot;http://www.freestylemind.com/how-to-keep-track-of-what-youve-learnt/&quot;&gt;&lt;b&gt;keep track of what you&#39;ve learnt&lt;/b&gt;&lt;/a&gt; is to keep a learning log like this one, so you store the real interesting things that helped you in some way in a search-able log. Another learning technique is to talk to someone else about a new thing you just discovered, that would normally make different points of views to show up about the same subject that you haven&#39;t though about before. That interaction will make the whole new stuff you&#39;ve learnt to cause a deeper impression in your brain and will help your memory to remember it later&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;High IQ != Smart.&lt;/b&gt; IQ tests can measure our analytical thinking. But &quot;we process information in two different ways, one is intuitive and spontaneous; the other is deliberative and reasoned&quot;. Our IQ can&#39;t predict which way will we go on while making a decision given an specific circumstance, this explains why intellectually-able people make fool decisions. &lt;a href=&quot;http://science.slashdot.org/story/09/11/04/178252/Why-a-High-IQ-Doesnt-Mean-Youre-Smart&quot;&gt;The link provided in Slashdot&lt;/a&gt; gives us advices on how to not make a quick-and-bind mistake&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blog.goyello.com/2009/09/22/can-emotional-intelligence-boost-your-career/&quot;&gt;&lt;b&gt;Are you emotionally intelligent ?&lt;/b&gt;&lt;/a&gt; Can you measure it ? Can we take benefit at work by knowing it ? I particularly found this article interesting,&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.insidethewebb.com/2009/11/interview-with-a-digg-com-software-engineer-kurt-wilms/&quot;&gt;&lt;b&gt;Interview with a Digg.com Software Engineer Kurt Wilms&lt;/b&gt;&lt;/a&gt;. The last question asked is an advice for up and comming programers. Focus on skills that are transferable&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.technologyreview.com/computing/23821/page1/&quot;&gt;&lt;b&gt;Software that fixes itself.&lt;/b&gt;&lt;/a&gt; I&#39;ve heard about this project some years ago and I couldn&#39;t believe it. And now it is actually working and doing something real, I still can&#39;t believe it !&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://java.dzone.com/articles/can-java-be-saved&quot;&gt;&lt;b&gt;Can Java be saved&lt;/b&gt;&lt;/a&gt;, Yet another discusion but really good to read, more the comments than the article.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://java.dzone.com/articles/java-can-be-saved&quot;&gt;&lt;b&gt;Java Can be saved.&lt;/b&gt;&lt;/a&gt; Well, the natural post response to the question :). This really shows a good point where Java is really weak. Read all the comments !!!</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/8860945317295244019' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/8860945317295244019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/8860945317295244019'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2009/11/dose-of-learning-not-only-technical.html' title='Dose of learning, not only technical aspects matters'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-8917727906358488580</id><published>2009-11-18T22:55:00.001-03:00</published><updated>2009-11-18T22:56:45.707-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="links"/><title type='text'>Interesting links</title><content type='html'>&lt;b&gt;Inspirational&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://news-service.stanford.edu/news/2005/june15/jobs-061505.html&quot;&gt;&#39;You&#39;ve got to find what you love,&#39;&lt;/a&gt; Jobs says. Inspiring article !!!&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=d0HVjoTD_ro&quot;&gt;Why Enginering ?&lt;/a&gt; Motivational ( insightful ) by Grady Booch&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Project Management&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;a href=&quot;http://www.bnet.com/2403-13056_23-357106.html&quot;&gt;Project management, how to get things done&lt;/a&gt;.  A short advice compilation from good PMs&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.travisdunn.com/9-ways-developers-fail-to-accommodate-business&quot;&gt;9 Ways Developers Fail to Accommodate Business&lt;/a&gt;.&amp;nbsp;Not purely tech aspects of software development/enginering involved people should be aware of&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://lifehacker.com/5378096/avoid-taking-the-blame-for-a-colleagues-mistake&quot;&gt;Taking the blame for a colleage mistake&lt;/a&gt;. What to do when it wasn&#39;t you who screw things up ( read the commets, they are more important ! )&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Junior developer advises&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://dotnet.dzone.com/news/be-more-efficient-and-don%E2%80%99t&quot;&gt;Be more efficient and don&#39;t read this&lt;/a&gt;. An advise to be balanced between learning/keeping up to date and GTD.&lt;/li&gt;
&lt;li&gt;A compilation of &lt;a href=&quot;http://stackoverflow.com/questions/194812/list-of-freely-available-programming-books&quot;&gt;free online-available books&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Hi all, I initially started to post link compilation of what I&#39;ve read in my spanish blog, but ultimately all the links I read are in english, so there is no sense to not post it here.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Basically, all posts under &#39;links&#39; tag will always have a compilation of links of pages I read, and a short quote of what is in it, or why it&amp;nbsp;might&amp;nbsp;be of interest for you.&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I hope you enjoy it, otherwise, remember this is not your blog and just go away :D&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/194812/list-of-freely-available-programming-books&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/8917727906358488580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/8917727906358488580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/8917727906358488580'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2009/11/interesting-links.html' title='Interesting links'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-5657995736604974284</id><published>2009-05-04T06:36:00.002-04:00</published><updated>2009-06-20T23:13:43.110-04:00</updated><title type='text'>Timeless quotes ...</title><content type='html'>Hi all !&lt;br /&gt;
&lt;br /&gt;
I was looking for interesting quotes every week since I started my last job and now that I&#39;ve collected a lof of them I want to share it. For some of the quotes I am not sure to whom it belongs, so I decided to let you google for the atributions :)&lt;br /&gt;
&lt;br /&gt;
Enjoy it !&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Realize that declarative programing is as easy as the 1300 pages&amp;nbsp;manual is showing it is :)&lt;/li&gt;
&lt;li&gt;Everything should be made as simple as possible, but not simpler&lt;/li&gt;
&lt;li&gt;Imagination is more important than knowledge&lt;/li&gt;
&lt;li&gt;Don&#39;t let your victories go to your head, or your failures go to your heart&lt;/li&gt;
&lt;li&gt;When the only tool you have is a hammer, everything looks like a nail&lt;/li&gt;
&lt;li&gt;Certified coffee addict !&lt;/li&gt;
&lt;li&gt;The question of whether computers can think is like the question of whether submarines can swim&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Knowledge talks, Wisdom listens&lt;/li&gt;
&lt;li&gt;UNIX motto: Provide mechanisms, not policy&lt;/li&gt;
&lt;li&gt;In theory, there is no difference between theory and practice, but in practice, there is :(&lt;/li&gt;
&lt;li&gt;An expert is someone who has made all possible mistakes in a very narrow field&lt;/li&gt;
&lt;li&gt;Before we work on artificial intelligence why don&#39;t we do something about natural stupidity ?&lt;/li&gt;
&lt;li&gt;C makes it easy to shut your foot if you want, C++ makes it a little bit harder, but when you finaly do, it blows out your whole leg !&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Imposible, es solo una opinion.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Style distinguishes excellence from accomplishment&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Simplicity is prerequisite for reliability&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;You are finally taking a shower ... now your phone rings ... and when you reach your phone to answer ... it was a wrong number&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;A documented bug is not a bug, it is a feature&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away&lt;/li&gt;
&lt;li&gt;Weeks of programming can save you hours of planning&lt;/li&gt;
&lt;li&gt;Computer science is an immature discipline, and I aim to keep it that way&lt;/li&gt;
&lt;li&gt;The great thing about Object Oriented code is that it can make small,&amp;nbsp;simple problems look like large, complex ones&lt;/li&gt;
&lt;li&gt;A good developer will understand the business implications of&amp;nbsp;technical decisions&lt;/li&gt;
&lt;li&gt;Always code as if the person who will maintain your work is a serial&amp;nbsp;killer that knows where you live&lt;/li&gt;
&lt;li&gt;Simplicity carried to the extreme becomes elegance&lt;/li&gt;
&lt;li&gt;A good developer can translate words and ideas into code, a good engineer creates those words and ideas&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;In order to understand recursion, one must first understand recursion :)&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;We follow two rules in the matter of optimization: Rule 1. Don’t do it. Rule 2 (for experts only). Don’t do it yet—that is, not until you have a perfectly clear and unoptimized solution&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;One mistake and you have to support it for the rest of your life&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Working with communities is more productive&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Once you get started, you’ll only stop because you’re exhausted&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;It takes another experienced person to really appreciate what you’re doing&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;One little thing going wrong can ruin everything.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Truly great programmers do not exist, there are only those who claim to be great, and those who know they are not great&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;And these ones comes from wikipedia &lt;a href=&quot;http://en.wikipedia.org/wiki/The_Seven_Habits_of_Highly_Effective_People&quot;&gt;Seven habits of higly effective people&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Be Proactive: Principles of Personal Choice&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Begin with the End in Mind: Principles of Personal Vision&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Put First Things First: Principles of Integrity &amp;amp; Execution&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Think Win/Win: Principles of Mutual Benefit&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Seek First to Understand, Then to be Understood: Principles of Mutual Understanding&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Synergize: Principles of Creative Cooperation&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Sharpen the Saw: Principles of Balanced Self-Renewal&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;[UPDATE]&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Typing is not now and never has been the bottleneck in writing code&lt;/li&gt;
&lt;li&gt;Software entities should be open for extension, but closed for modification.&lt;/li&gt;
&lt;li&gt;Buy the best, build the rest&lt;/li&gt;
&lt;li&gt;The most difficult thing in the world is to know how to do a thing and to watch someone else do it wrong without comment.&lt;/li&gt;
&lt;li&gt;Use the simplest thing that could possibly work&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/5657995736604974284' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/5657995736604974284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/5657995736604974284'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2009/05/timeless-quotes.html' title='Timeless quotes ...'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-6847785764612037703</id><published>2009-03-11T09:28:00.005-04:00</published><updated>2009-03-13T11:42:38.524-04:00</updated><title type='text'>Where do you host your website to scale ?</title><content type='html'>I have been talking to some colleagues about how to start a project that you know it will probably need to scale in a couple of months, think of a heavy text content site. [&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;update&lt;/span&gt;: like a lyrics site with kind of social features added to it, with urls that makes the search engines happy]&lt;br /&gt;
&lt;br /&gt;
Actually what we have as far as I know are services like &lt;a href=&quot;http://code.google.com/appengine/&quot;&gt;google appengine&lt;/a&gt;, that provides you with a full api where you can build your web site. You know they give you processor time, storage space in their&amp;nbsp;datastore, kind of non-relational ( but scalable ) database and a lot of network throughput. What I like about this service is that you pay very little money for a lot of resources, at least as far as know.&lt;br /&gt;
&lt;br /&gt;
Then you have virtualization services like &lt;a href=&quot;http://www.linode.com/index.cfm&quot;&gt;linode&lt;/a&gt; and &lt;a href=&quot;http://aws.amazon.com/&quot;&gt;amazon ec2&lt;/a&gt; and other services that I like more because it gives you full control of how to program your site without limiting you with a closed api or closed vendeor.&lt;br /&gt;
&lt;br /&gt;
Microsoft also offer public cloud computing services called &lt;a href=&quot;http://www.microsoft.com/azure/default.mspx&quot;&gt;azure&lt;/a&gt; and I think &lt;a href=&quot;http://developer.yahoo.com/yap/&quot;&gt;yahoo&lt;/a&gt; also.&lt;br /&gt;
&lt;br /&gt;
But here are some things to have in mind. I don&#39;t have a good feeling about who&#39;s the real owner of your application since you upload your code to google appengine for example. Or then you fear that they&#39;ll say you that your application violates some policies you were supposed to follow. Well, I think you understand.&lt;br /&gt;
&lt;br /&gt;
I think comparing services like appengine and the ones that offer virtualization creates you another problem if for any reason you need to move from one to another, because you probably will need to re-enginer the urls if you&#39;ll change the way you are programing and you know, there goes all your page ranking and you&#39;ll have broken links if you gained some of them before wanting to move your application.&lt;br /&gt;
&lt;br /&gt;
I am sorry if my English is irritating you, but this is as far as I can talk, what I want to know from you is what will be your thoughts on this topic. What will be the service you&#39;ll choose and why. Which services are you using and what is your experience in it.&lt;br /&gt;
&lt;br /&gt;
Thanks</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/6847785764612037703' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/6847785764612037703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/6847785764612037703'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2009/03/where-do-you-host-your-website-to-scale.html' title='Where do you host your website to scale ?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-8111554329557948191</id><published>2008-11-24T12:55:00.004-03:00</published><updated>2008-12-06T22:07:19.731-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>An approach to configurable parameters</title><content type='html'>It is annoying how much work you need to do just to get all the properties from the file mapped to a class catching all the exceptions and repeating many times the same keys&amp;nbsp;thorough&amp;nbsp;the configuration files. For example, normally I had before a class that has static String variables each one mapping a key in the property file and then I use those variables when loading the properties and validating, etc.&lt;br /&gt;
&lt;br /&gt;
When you need to load some properties from a file to your application in order to have some configurable parameters normally you use an external file in case of having a Java SE application or a resource bundled in your Java package such as yourwar/META-INF/applicationProperties.xml.&lt;br /&gt;
&lt;br /&gt;
I have write some dirty (ugly) code just to give you an idea of how that can be easier.&lt;br /&gt;
&lt;br /&gt;
Supose the next scenario.&lt;br /&gt;
you have a applicationProperties.xml file&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE properties SYSTEM &quot;http://java.sun.com/dtd/properties.dtd&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;properties&amp;gt;&lt;br /&gt;
&amp;lt;comment&amp;gt;&lt;br /&gt;
The good thing of using the xml version of properties file is that &lt;br /&gt;
it is &quot;easy&quot; to see the whitespaces that normally endup at the end of &lt;br /&gt;
the strings and most of the times we forget to use value.trim() ...&lt;br /&gt;
and then some time is spent for that stupid bug&lt;br /&gt;
&amp;lt;/comment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;entry key=&quot;connectionString&quot;&amp;gt;jdbc:h2:file:c:\h2db\dbName&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&quot;user&quot;&amp;gt;sa&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&quot;password&quot;&amp;gt;saadmin&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&quot;poolSize&quot;&amp;gt;7&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&quot;timeoutMillis&quot;&amp;gt;7000&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&quot;retryInterval&quot;&amp;gt;3&amp;lt;/entry&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
and the next class mapping your file properties&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class ConfigurableParameters {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public String _connectionString;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public String _user;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public String _password;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public Integer _poolSize;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public Long _timeoutMillis;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public Integer _retryInterval;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; private static ConfigurableParameters instance;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public static ConfigurableParameters getInstance() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (instance == null) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; instance = new ConfigurableParameters();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;return instance;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
You see, the only time where you repeated the keys are in the name of the variables of the class. Now,&amp;nbsp;wouldn&#39;t it be nice to load all the properties like this ?&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public static void main(String[] args) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;boolean confSuccess = ConfigurationHelper.mapConfigurableProperties(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ConfigurationSource.FILE,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;applicationProperties.xml&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ConfigurableParameters.getInstance());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (!confSuccess) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Error loading configuration&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(ConfigurableParameters.getInstance()._connectionString);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(ConfigurableParameters.getInstance()._user);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(ConfigurableParameters.getInstance()._password);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(ConfigurableParameters.getInstance()._poolSize);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(ConfigurableParameters.getInstance()._timeoutMillis);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(ConfigurableParameters.getInstance()._retryInterval);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
The reason I make that the function recognizes all the fields starting with an underscore is just to make it clear that it will expect that those fields have a key in the properties file.&lt;br /&gt;
&lt;br /&gt;
Actually You can make the fields of&amp;nbsp;ConfigurableParameters class to be private and just provide public getters, it will still set the parameters. Also you can load the properties from a bundle file resource of the packaged jar, just call the method with ConfigurationSource.RESOURCE, and your sourceAddress would be something like &quot;/META-INF/applicationProperties.xml&quot;, depending where did you put the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The implementation for the ConfigurationHelper is here&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class ConfigurationHelper {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public enum ConfigurationSource {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;RESOURCE, FILE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public static boolean mapConfigurableProperties(ConfigurationSource configurationSource, String sourceAddress, Object target) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (configurationSource == null || sourceAddress == null || target == null )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Properties sourceProperties =&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getSourceProperties(configurationSource, sourceAddress, target);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sourceProperties.isEmpty())&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (Field f : target.getClass().getDeclaredFields()) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String fieldName = f.getName();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!fieldName.startsWith(&quot;_&quot;))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fieldName = fieldName.substring(1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!sourceProperties.containsKey(fieldName))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;boolean originalAccesibleValue = f.isAccessible();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f.setAccessible(true);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f.set(target, getConvertedValueForType((String) sourceProperties.get(fieldName), f.getType()));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f.setAccessible(originalAccesibleValue);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; private static Properties getSourceProperties(ConfigurationSource configurationSource, String sourceAddress, Object target) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;Properties prop = new Properties();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InputStream is =&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;configurationSource == ConfigurationSource.FILE ?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new FileInputStream(sourceAddress) :&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;target.getClass().getResourceAsStream(sourceAddress);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prop.loadFromXML(is);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; is.close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;return prop;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; private static Object getConvertedValueForType(String sourceValue, Class c) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;Object convertedValue = null;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (c == String.class) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; convertedValue = sourceValue;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;else if (c == Long.class) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; convertedValue = new Long((String) sourceValue);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;else if (c == Integer.class) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; convertedValue = new Integer((String) sourceValue);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;else if (c == BigDecimal.class) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; convertedValue = new BigDecimal((String) sourceValue);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;return convertedValue;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
This all may seem out of the standard conventions and I just didn&#39;t think of another way of doing this. It is just an idea of how can you make the work of loading configurable properties easier.&lt;br /&gt;
&lt;br /&gt;
Have fun trying it and please give me feedback about how you are doing it.</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/8111554329557948191' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/8111554329557948191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/8111554329557948191'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2008/11/approach-to-configurable-parameters.html' title='An approach to configurable parameters'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-1062145681464285756</id><published>2008-11-21T00:04:00.007-03:00</published><updated>2009-03-17T10:15:54.815-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="webservices"/><title type='text'>Easiest way to publish Java Web Services --how to</title><content type='html'>&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;In a &lt;a href=&quot;http://hofmanndavid.blogspot.com/2008/10/easy-webservices-in-java-not-common-way.html&quot;&gt;previous post&lt;/a&gt; I wrote about publishing a Web Service through an embeddable ejb3 implementation, which is good since @Stateless beans can have injected managed entityManagers, in some cases that is the way to go if you don&#39;t want to deploy your app in a full J2EE server or you need a more flexible environment.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;Just days ago I found that the J2SE itself has an lightweight http server embedded into, and the API itself has an Endpoint class that allows you to publish a Web Service in a J2SE environment.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;There is more than one way for doing this, but this is the more automatic I could found, the next is a working example. The JRE version I am using is 6 update 7, I am not sure since when it supports it&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;-----&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import javax.jws.WebService;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import javax.jws.soap.SOAPBinding;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import javax.jws.soap.SOAPBinding.Style;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import javax.xml.ws.Endpoint;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; font-family: &#39;Times New Roman&#39;; font-size: 16px; white-space: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@WebService&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@SOAPBinding(style=Style.RPC) // without this it does not work automatically.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class ASimpleTest {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    public static class WebServiceTest {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;        public String callMe(String name) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;            return &quot;Hello &quot;+name+&quot; !&quot;;       &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    public static void main(String[] args) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;       Endpoint.publish(&quot;http://localhost:8080/sayHello&quot;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;                        new WebServiceTest());&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;       // http://localhost:8080/sayHello?wsdl will be the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;       // place for the wsdl generated on the fly&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: &#39;Courier New&#39;; font-size: 13px; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: &#39;Courier New&#39;; font-size: 13px; white-space: pre-wrap;&quot;&gt;       // remember to use the DNS address of your IP or&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: &#39;Courier New&#39;; font-size: 13px; white-space: pre-wrap;&quot;&gt;       // your IP itself if you want to expose so&amp;nbsp;as to&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: &#39;Courier New&#39;; font-size: 13px; white-space: pre-wrap;&quot;&gt;       // be accessible not only from localhost or&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: &#39;Courier New&#39;; font-size: 13px; white-space: pre-wrap;&quot;&gt;       // 127.0.0.1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; }&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;-----&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; font-weight: bold; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Now you wonder how does this work ?&lt;/span&gt; Well, as you publish(...) it starts its embedded http server and binds the webservice automatically generated from the WebServiceTest class to the ip:port you&#39;ve specified. The threading configuration should be quite ok for most cases.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;Have fun trying it !&lt;/span&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/1062145681464285756' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/1062145681464285756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/1062145681464285756'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2008/11/easiest-way-to-publish-java-web.html' title='Easiest way to publish Java Web Services --how to'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-1906016947233432439</id><published>2008-11-12T18:29:00.002-03:00</published><updated>2008-11-20T05:55:47.702-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Run Java application as Windows Services</title><content type='html'>Sometimes you need to execute a java program as the machine starts without the needing to log-in. To achieve that you need to make a Windows Service.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;    For the purpose of this short how to, I will assume you have a folder with aRunnableJarFile.jar with maybe a lib folder and a configuration file for the java application, which is the usual way for packaging Java applications&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
One option, and the one I like the most is to use the open source project at &lt;a href=&quot;http://jslwin.sourceforge.net/&quot;&gt;Java Service Launcher&lt;/a&gt;, it gives you two important files. jsl.exe and jsl.ini. you normally put those files in the same folder as yourRunnableJarFile.jar.&lt;br /&gt;
You edit the jsl.ini file so as to tell jsl.exe how to launch your runnable jar ( e. g. cmdline= -jar aRunnableJarFile.jar ), you can also configure where the jvm is, where will be the working directory for your application as the service starts, where you&#39;ll redirect all the output or erroutput of the sevice to a file and things like that.&lt;br /&gt;
As you have the jsl.ini configured you can run your application with &#39;jsl.exe -debug&#39; which will launch your java app rigth in the console so you can see if everything went ok with the jsl.ini, you can also run &#39;jsl.exe -install&#39; and it will create a windows service pointing to that jsl.exe file.&lt;br /&gt;
As you start the windows service ( or normally configure it to automatically start ) it will launch the jsl.exe file wihch will run your java application. When you stop the windows service jsl will call System.exit() in you app, so any shutdown hooks that you configured will be called by default. It is really easy.&lt;br /&gt;
&lt;br /&gt;
Another option is to create a exe wrapping your jar file. &lt;a href=&quot;http://jsmooth.sourceforge.net/&quot;&gt;JSmooth &lt;/a&gt;is an open source project that does exactly that.&lt;br /&gt;
It has a graphic user interface that walks you though wizard-like steps to create an exe wrapper for your Java application and as you create the wrapper, you tell jsmooth that you want the wrapper to be a windows service.&lt;br /&gt;
It produces aRunnableFileWrappingYourJarFile.exe which you can run with an &#39;install&#39; or &#39;remove&#39; argument to install or remove the application as a windows service.&lt;br /&gt;
&lt;br /&gt;
Although I didn&#39;t see something similar to jsl.exe, &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=java+exe+wrapper&amp;amp;btnG=Google+Search&amp;amp;aq=1&amp;amp;oq=java+exe+&quot;&gt;there are lots&lt;/a&gt; of programs like jsmoth but mostly commercial.&lt;br /&gt;
&lt;br /&gt;
Hope you can find useful this post and any problems you have I&#39;ll do my best to help you&lt;br /&gt;
&lt;br /&gt;
P.D.: please forgive my bad English</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/1906016947233432439' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/1906016947233432439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/1906016947233432439'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2008/11/run-java-application-as-windows.html' title='Run Java application as Windows Services'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-6051367652456037998</id><published>2008-10-22T22:45:00.011-03:00</published><updated>2009-11-27T23:15:48.957-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="webservices"/><title type='text'>Easy WebServices in Java (not the common way)</title><content type='html'>Where we are working now we needed to have a fast way to create WebServices and I didn&#39;t want to deal/manage J2EE containers (packaging/deployment ...) so I tried what &lt;a href=&quot;http://openejb.apache.org/&quot;&gt;OpenEJB &lt;/a&gt;&amp;nbsp;has to offer.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;OpenEJB is an embedable and ligthweight implementation of EJB3&lt;/span&gt;, can be used as a standalone server also. In popular words, OpenEJB &amp;nbsp;is a way in&amp;nbsp;which&amp;nbsp;you can have everything that is available in the EJB3 container, but &#39;outside&#39; the container&amp;nbsp;(well, not really).&lt;/div&gt;&lt;div&gt;Consider the next step by step tutorial for creating a webservice.&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Create a sampleproject&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://openejb.apache.org/download.html&quot;&gt;Download &lt;/a&gt;&amp;nbsp;openejb-3.0.zip from http://openejb.apache.org/download.html and unpack it&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Add to the classpath of your sampleproject every .jar file that&#39;s in unpacked/lib&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Create a META-INF folder inside your src directory and create a file inside that folder called ejb-jar.xml and just put in it this stringr &quot;&amp;lt;ejb-jar/&amp;gt;&quot; (without quotes)&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Create now the interface that defines the contract of your webservice and anotate it with&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; @WebService(targetNamespace=&quot;http://yourcompany.com/wsdl&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; public interface TestWs { ... }&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create the class that implements your interface and anotate it like this:&lt;/li&gt;
&lt;/ul&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; @Stateless&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; @WebService(portName = &quot;TestPort&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serviceName = &quot;TestWsService&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; targetNamespace = &quot;http://yourcompany.com/wsdl&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endpointInterface = &quot;full.qualified.name.of.your.interface.TestWs&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; public class TestImpl { ... }&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;To start the Webservice you need to do this:&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; pubilc static void main(String[] args) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;Properties properties = new Properties();&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;org.apache.openejb.client.LocalInitialContextFactory&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;properties.setProperty(&quot;openejb.embedded.remotable&quot;, &quot;true&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;new InitialContext(properties); // here the magic starts ....&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Taran !, after this steps what you have is a stateless bean exposed as a webservice in this location:&amp;nbsp;&lt;a href=&quot;http://localhost:4204/TestImpl?wsdl&quot;&gt;http://localhost:4204/TestImpl?wsdl&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;ejb-jar&gt;You can use apache axis2 if you want to generate a Java client for it or just use a dynamic proxy like this:&lt;br /&gt;
&lt;br /&gt;
&lt;/ejb-jar&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; // this code can be placed rigth after InitialContext call,&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; // can be in another program&amp;nbsp;or in another thread in the&amp;nbsp;same program&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; // Of course, the program that made the call to InitContext need to be&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; // alive for the EJB3 services to be exposed&lt;/span&gt;&lt;br /&gt;
&lt;ejb-jar&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; URL serviceUrl = new URL(&quot;http:/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;/localhost:4204/TestImpl?wsdl&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; Service testService = Service.create(serviceUrl, null);&lt;/span&gt;&lt;/ejb-jar&gt;&lt;br /&gt;
&lt;ejb-jar&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; TestWs&amp;nbsp;testWs =&amp;nbsp;testService.getPort(TestWs.class);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; // test the methods you&#39;ve implemented ...&lt;/span&gt;&lt;/ejb-jar&gt;&lt;br /&gt;
&lt;ejb-jar&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; You would be wondering how does it works ?&lt;/span&gt;&lt;/ejb-jar&gt;&lt;br /&gt;
&lt;ejb-jar&gt;Well, as you request the initial context, openejb automatically searchs for clases in your classpath containing ejb3-related anotations, it automaticaly exposes them as it founds, more or less as it happens when you deploy an application as a .ear in any aplication server, but simpler and with great flexibility due to its embedable architecture.&lt;/ejb-jar&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;ejb-jar&gt;UPDATE 10 / 29&amp;nbsp; / 2008&lt;/ejb-jar&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ejb-jar&gt;By default openejb serves only to localhost request, if you want to use the exposed webservice from other computers add the next properties to InitialContext(prop)&lt;/ejb-jar&gt;&lt;br /&gt;
&lt;ejb-jar&gt;prop.setProperty(&quot;httpejbd.bind&quot;, &quot;0.0.0.0&quot;);&lt;/ejb-jar&gt;&lt;br /&gt;
prop.setProperty(&quot;ejbd.bind&quot;, &quot;0.0.0.0&quot;);&lt;/div&gt;and if you want to change the default port in use, change the next properties:&lt;br /&gt;
httpejbd.port, ejbd.bind&lt;br /&gt;
Suppose your machine has more than one IP and you want that openejb answers only to requests comming from only one of the IPs in the server, then put the desired IP instead of 0.0.0.0</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/6051367652456037998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/6051367652456037998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/6051367652456037998'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2008/10/easy-webservices-in-java-not-common-way.html' title='Easy WebServices in Java (not the common way)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104781243427600828.post-8634020637712110505</id><published>2008-07-11T23:49:00.005-04:00</published><updated>2009-11-27T23:16:49.471-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Java builds made easy with FatJar</title><content type='html'>This plug-in allows you to deploy your working eclipse &#39;project&#39; in one single jar with just one easy step. It finds all the dependencies your project currently depends on --Jars, External-Jars, User-Libraries, System-Libraries, Classes-Folders and     Project-Exports are taken into account.&lt;br /&gt;
&lt;br /&gt;
In the export wizard you can also select the main class for the jar being exported.&lt;br /&gt;
&lt;br /&gt;
As far as I have used, it performs very well, though the project is still in beta stage. It works joining all the dependency clases and resources into one single jar, very handy for some situations where you develop some swing interfaces, or simple demons or small things like that. Give it a try to &lt;a href=&quot;http://fjep.sourceforge.net/&quot;&gt;FatJar Eclipse Plug-in&lt;/a&gt;, it really worth !&lt;br /&gt;
&lt;br /&gt;
Of course, this is not a replacement for tools such &lt;a href=&quot;http://ant.apache.org/&quot;&gt;Ant&lt;/a&gt; or &lt;a href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt;, because this is a complete different approach for buildings. Do not use it for very big projects, but for small to medium sized applications I think will give you a lot less headaches than dealing with formal building tools, saving you time and effort while providing what you just need: a working Jar :)</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/104781243427600828/8634020637712110505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/8634020637712110505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104781243427600828/posts/default/8634020637712110505'/><link rel='alternate' type='text/html' href='http://hofmanndavid.blogspot.com/2008/07/java-builds-made-easy-fatjar-eclipse.html' title='Java builds made easy with FatJar'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>