<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog de sergio &#187; Java</title>
	<atom:link href="http://www.serunix.com/tag/java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.serunix.com</link>
	<description>&#34;Un informático que sólo quiere ayudar... &#34;</description>
	<lastBuildDate>Sun, 04 Sep 2011 19:34:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>1 Parte &#8211; Hessian:  Un ejemplo de creación de un Web Services con Hessian en Java ejecutándolo con GlassFish</title>
		<link>http://www.serunix.com/2010/01/24/1-parte-hessian-un-ejemplo-de-creacion-de-un-web-services-con-hessian-en-java-ejecutandolo-con-glassfish</link>
		<comments>http://www.serunix.com/2010/01/24/1-parte-hessian-un-ejemplo-de-creacion-de-un-web-services-con-hessian-en-java-ejecutandolo-con-glassfish#comments</comments>
		<pubDate>Sun, 24 Jan 2010 15:09:24 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=637</guid>
		<description><![CDATA[ ]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Hace mucho tiempo que había trabajado con <a href="http://hessian.caucho.com/">Hessian</a>, y la verdad es que me había gustado mucho:<br />
<em><br />
<strong>The Hessian binary web service protocol makes web services usable without requiring a large framework, and without learning yet another alphabet soup of protocols. Because it is a binary protocol, it is well-suited to sending binary data without any need to extend the protocol with attachments</strong>.</em></p>
<p style="text-align: justify;">Y recordando <del>un poco por que se me olvida</del> aquí les dejo un ejemplo de un Web Services con Hessian,  es una de las maneras más fáciles de implementar un Web Services ya que es:</p>
<ul style="text-align: justify;">
<li> Se puede implementar en  muchisimos lenguajes como:
<ul>
<li> Java</li>
<li>Ruby</li>
<li>Python</li>
<li>PHP</li>
<li>.NET C#</li>
<li>y muchos más</li>
</ul>
</li>
<li>Nos olvidamos de definición de esquemas, SOAP, WSDL, CORBA IDL, etc</li>
<li>Soporta cifrado, compresión (es indispensable para no saturar el Ancho de Banda), autenticación, etc.</li>
<li style="text-align: justify;">Es muy sencillo de implementarlo, y más</li>
</ul>
<p>Este es un ejemplo muy pero muy básico, así que lo que quisimos hacer es obtener la lista de usuarios x.<br />
Para crear el Servidor lo primero que hay que hacer es:</p>
<p>1.- <strong>Necesitamos crear un Proyecto Web, el cual sera el <strong>servidor</strong> que va estar escuchando todas las peticiones. (en mi caso utilice NetBeans)</strong><br />
2.- <strong>Después creamos nuestras clases (yo quiero regresar una lista con usuarios de tipo User que tiene como atributo userId, name, lasname, email)</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
package com.serunix.bean;
&nbsp;
/**
 *
 * @author serunix.com
 */
public class User  implements java.io.Serializable {
&nbsp;
    private int userId;
    private String name;
    private String lasName;
    private String email;
&nbsp;
    /**
     * @return the userId
     */
    public int getUserId() {
        return userId;
    }
&nbsp;
    /**
     * @param userId the userId to set
     */
    public void setUserId(int userId) {
        this.userId = userId;
    }
&nbsp;
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
&nbsp;
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
&nbsp;
    /**
     * @return the lasName
     */
    public String getLasName() {
        return lasName;
    }
&nbsp;
    /**
     * @param lasName the lasName to set
     */
    public void setLasName(String lasName) {
        this.lasName = lasName;
    }
&nbsp;
    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }
&nbsp;
    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }
}</pre></td></tr></table></div>

<p>3.- <strong>Creamos nuestros métodos disponibles </strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
package com.serunix.services;
&nbsp;
import java.util.List;
&nbsp;
/**
 *
 * @author serunix.com
 */
public interface UserServices {
&nbsp;
    List ObtainListUsers();
}</pre></td></tr></table></div>

<p>4.- <strong>Creamos la implementación, la cual tendrá toda la lógica</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
package com.serunix.services.impl;
&nbsp;
import com.caucho.hessian.server.HessianServlet;
import com.serunix.bean.User;
import com.serunix.services.UserServices;
import java.util.ArrayList;
import java.util.List;
&nbsp;
/**
 *
 * @author serunix.com
 */
public class UserServicesImpl extends HessianServlet implements UserServices {
&nbsp;
    public List ObtainListUsers() {
     List list = new ArrayList();
&nbsp;
        User users = new User();
        users.setUserId(1);
        users.setName(&quot;sergio&quot;);
        users.setLasName(&quot;Salazar&quot;);
        users.setEmail(&quot;admin@serunix.com&quot;);
        list.add(users);
        users = new User();
        users.setUserId(1);
        users.setName(&quot;sergio2&quot;);
        users.setLasName(&quot;López2&quot;);
        users.setEmail(&quot;admin@serunix.com&quot;);
        list.add(users);
&nbsp;
        return list;
    }
&nbsp;
}</pre></td></tr></table></div>

<p>5.- <strong>Y por último modificamos nuestro <em>web.xml</em> y levantamos el <em>server</em> que en este caso estoy utilizando GlassFish</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;servlet&gt;</span>
        <span style="color: #009900;">&lt;servlet-name&gt;</span>UserServicesImpl<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>servlet-name&gt;</span>
        <span style="color: #009900;">&lt;servlet-class&gt;</span>com.serunix.services.impl.UserServicesImpl<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>servlet-class&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>servlet&gt;</span>
    <span style="color: #009900;">&lt;servlet-mapping&gt;</span>
        <span style="color: #009900;">&lt;servlet-name&gt;</span>UserServicesImpl<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>servlet-name&gt;</span>
        <span style="color: #009900;">&lt;url-pattern&gt;</span>/UserServicesImpl<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>url-pattern&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>servlet-mapping&gt;</span></pre></td></tr></table></div>

<p>6.- <strong>Y creamos nuestro cliente. </strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">package test.serunix;
&nbsp;
import com.caucho.hessian.client.HessianProxyFactory;
import com.serunix.bean.User;
import com.serunix.services.UserServices;
import java.net.MalformedURLException;
import java.util.Iterator;
import java.util.List;
/**
 *
 * @author sergio
 */
public class testHessian {
&nbsp;
    public static void main(String[] args) throws MalformedURLException, ClassNotFoundException {
&nbsp;
        String url = &quot;http://localhost:8080/EJEMPLOHESSIAN/UserServicesImpl&quot;;
&nbsp;
        HessianProxyFactory factory = new HessianProxyFactory();
        UserServices userservices = (UserServices) factory.create(url);
        List users = userservices.ObtainListUsers();
&nbsp;
        Iterator ite = users.iterator();
        while (ite.hasNext()) {
            User user = (User) ite.next();
            System.out.print(&quot;*******************  \n&quot;);
            System.out.print(&quot;Name: &quot; + user.getName() + &quot;  \n&quot;);
            System.out.print(&quot;LasName: &quot; + user.getLasName() + &quot;  \n&quot;);
            System.out.print(&quot;Email: &quot; + user.getEmail() + &quot;  \n&quot;);
        }
    }
}</pre></td></tr></table></div>

<p>7.- Y listo!!!!</p>
<p>La verdad es que es muy fácil, <a onclick="javascript: pageTracker._trackPageview ('/outgoing/proyecto_hessian');" href="http://www.serunix.com/wp-content/uploads/EJEMPLO.zip">aquí</a> les dejo el proyecto entero. Si me quieren dejar un feedback no duden en hacerlo. </p>
<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(637, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_637_1" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_637_1" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2010/01/24/1-parte-hessian-un-ejemplo-de-creacion-de-un-web-services-con-hessian-en-java-ejecutandolo-con-glassfish/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Java: ¿Al iterar los elementos de un objeto List, tenemos que validar que sea distinto de null?</title>
		<link>http://www.serunix.com/2010/01/19/java-%c2%bfal-iterar-los-elementos-de-un-objeto-list-tenemos-que-validar-que-sea-distinto-de-null</link>
		<comments>http://www.serunix.com/2010/01/19/java-%c2%bfal-iterar-los-elementos-de-un-objeto-list-tenemos-que-validar-que-sea-distinto-de-null#comments</comments>
		<pubDate>Tue, 19 Jan 2010 21:20:45 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=623</guid>
		<description><![CDATA[Se que es algo super básico, pero la verdad es que nunca esta de más saberlo&#8230; o recordarlo jajajaj la situación es la siguiente: cuando obtenemos una lista de un objeto cualquiera y no sabemos si tiene datos, lo mejor es validar la lista, pero si no quieres hacerlo y hacer un Iterator, púes no [...]]]></description>
			<content:encoded><![CDATA[<p>Se que es algo super básico, pero la verdad es que nunca esta de más saberlo&#8230; o recordarlo jajajaj la situación es la siguiente: cuando obtenemos una lista de un objeto cualquiera y no sabemos si tiene datos, lo mejor es validar la lista, pero si no quieres hacerlo y hacer un Iterator, púes no es necesario que valides que sea <strong>null</strong>, ya que aunque la lista no tenga elementos se crea un objeto tipo iterador  por ejemplo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">/**
 * 
 */
package com.test.serunix;
&nbsp;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
&nbsp;
/**
 * @author serunix.com
 *
 */
public class TestList {
&nbsp;
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// creamos un tipo lista vació
		List<span style="color: #009900;">&lt;String&gt;</span> list = new ArrayList<span style="color: #009900;">&lt;String&gt;</span>();
		// creamos el itelador (se que se puede iterar de otra manera a partir de java 1.5)
		Iterator<span style="color: #009900;">&lt;String&gt;</span> ite = list.iterator();
		// no validamos el iterador
		while(ite.hasNext()) // así que el iterador revisa si hay elementos, de lo contrario no sigue el bucle.
		{
			String value = (String) ite.next();
		}
&nbsp;
	}
}</pre></td></tr></table></div>

<p>En otras palabras, siempre se crea un tipo lista así que no daría un<strong> java.lang.NullPointerException</strong> sólo ocurría esta excepción si la lista fuera inicializada como un <strong>null</strong> o que el método regrese un <strong>null</strong> por ejemplo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">/**
 * 
 */
package com.test.serunix;
&nbsp;
import java.util.Iterator;
import java.util.List;
&nbsp;
/**
 * @author serunix.com
 *
 */
public class TestList {
&nbsp;
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		List<span style="color: #009900;">&lt;String&gt;</span> list = obtainListElement();
&nbsp;
		Iterator<span style="color: #009900;">&lt;String&gt;</span> ite = list.iterator();
&nbsp;
		while(ite.hasNext())
		{
			String value = (String) ite.next();
		}
	}
&nbsp;
	public static List<span style="color: #009900;">&lt;String&gt;</span> obtainListElement() {
&nbsp;
		List<span style="color: #009900;">&lt;String&gt;</span> list = null;
		return list;
&nbsp;
	}
&nbsp;
}</pre></td></tr></table></div>

<p>Así que cada quien sabe que hace en cada caso.</p>
<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(623, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_623_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_623_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2010/01/19/java-%c2%bfal-iterar-los-elementos-de-un-objeto-list-tenemos-que-validar-que-sea-distinto-de-null/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Source: Cómo podemos monitorizar nuestras aplicaciones con JAMon???</title>
		<link>http://www.serunix.com/2009/12/31/open-source-como-podemos-monitorizar-nuestras-aplicaciones-con-jamon</link>
		<comments>http://www.serunix.com/2009/12/31/open-source-como-podemos-monitorizar-nuestras-aplicaciones-con-jamon#comments</comments>
		<pubDate>Thu, 31 Dec 2009 17:36:13 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=592</guid>
		<description><![CDATA[JAMon: ¨The Java Application Monitor (JAMon) is a free, simple, high performance, thread safe, Java API that allows developers to easily monitor production applications.¨ Nos ayuda a monitorizar nuestras aplicaciones, para poder saber que recurso se manda ejecutar con mayor concurrencia, monitorización del jdbc proxi, etc. tanto en aplicaciones web como Stand-alone, en su página [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jamonapi.sourceforge.net/">JAMon</a>: ¨The Java Application Monitor (JAMon) is a free, simple, high performance, thread safe, Java API that allows developers to easily monitor production applications.¨</p>
<p>Nos ayuda a monitorizar nuestras aplicaciones,  para poder saber que recurso se manda ejecutar con mayor concurrencia, monitorización del jdbc proxi, etc. tanto en aplicaciones web como  <em>Stand-alone</em>, en su página esta el software y la documentación necesaria  para poderlo implementar de una manera fácil y en pocos pasos.<br />
Cuando hice el un main() todo me funciono correctamente pero he tenido problemas para  que muestre las estadísticas dentro de una aplicación web, así que les dejo el <em>main</em> que prácticamente es el que esta en su página, y cuando logre corregir los problemas que tengo para implementarlo en otra aplicación les escribo un nuevo post con los problemas y las soluciones, además de los resultados.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">/**
 * 
 */
package test;
&nbsp;
import com.jamonapi.Monitor;
import com.jamonapi.MonitorFactory;
&nbsp;
/**
 * @author serunix.com
 *
 */
public class TestJAMon {
&nbsp;
	/**
	 * @param args
	 * @throws InterruptedException 
	 */
	public static void main(String[] args) throws InterruptedException {
		// TODO Auto-generated method stub
&nbsp;
		Monitor mon=null;
        for (int i=1; i<span style="color: #009900;">&lt;<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">10</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #009900;">            mon <span style="color: #66cc66;">=</span> MonitorFactory.<span style="color: #000066;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;myFirstMonitor&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">            Thread.sleep<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span>+i<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">            mon.stop<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #009900;">        <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #009900;">        System.out.println<span style="color: #66cc66;">&#40;</span>mon.toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; </span>
&nbsp;
&nbsp;
<span style="color: #009900;">	<span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #66cc66;">&#125;</span></span></pre></td></tr></table></div>

<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(592, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_592_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_592_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2009/12/31/open-source-como-podemos-monitorizar-nuestras-aplicaciones-con-jamon/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Base de datos: Un ejemplo de Ibatis con Spring en java</title>
		<link>http://www.serunix.com/2009/12/22/base-de-datos-un-ejemplo-de-ibatis-con-spring-en-java</link>
		<comments>http://www.serunix.com/2009/12/22/base-de-datos-un-ejemplo-de-ibatis-con-spring-en-java#comments</comments>
		<pubDate>Tue, 22 Dec 2009 23:10:52 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Base de datos]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=566</guid>
		<description><![CDATA[La verdad es que no sabía nada de este Ibatis (framework de persistencia de datos basado en archivos xml), si no te lo enseñan hay que aprender sólo para poderse dar una idea de las diferentes  opciones que hay en cuanto al manejo de la Data Base. Aquí les dejo un pequeño ejemplo de como [...]]]></description>
			<content:encoded><![CDATA[<p>La verdad es que no sabía nada de este <a href="http://ibatis.apache.org/">Ibatis</a> (framework de persistencia de datos basado en archivos xml), si no te lo enseñan hay que aprender sólo para poderse dar una idea de las diferentes  opciones que hay en cuanto al manejo de la <a href="http://www.serunix.com/category/base-de-datos"><em>Data Base</em></a>. Aquí les dejo un pequeño ejemplo de como sería la configuración de Ibatis con Spring y que esta en java, ya que también se puede hacer con Ruby. Ibatis tiene sus ventajas y desventajas, así que sólo queda probarlo. </p>
<p>1.- El ejemplo se basa en almacenar las recetas de una farmacia.</p>
<p>2.- Creamos los DTO</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">package com.serunix.model;
&nbsp;
import java.util.List;
&nbsp;
/**
 * @author serunix
 *
 */
public class Recipe {
&nbsp;
	private int recipeId;
	private String patientName;
	private List<span style="color: #009900;">&lt;?&gt;</span> medicaments;	
}</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">package com.serunix.model;
&nbsp;
/**
 * @author serunix
 *
 */
public class Medicament  {
&nbsp;
	private int medicamentId;
	private String name;
	private String description;
	private Recipe recipe;
}</pre></td></tr></table></div>

<p>2.- Los servicios</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">package com.serunix.model.services;
&nbsp;
import java.util.List;
&nbsp;
import com.serunix.model.Recipe;
&nbsp;
/**
 * @author serunix
 *
 */
public interface RecipeDaoImpl {
&nbsp;
	List<span style="color: #009900;">&lt;?&gt;</span> getAllRecipes();
&nbsp;
	Recipe getRecipeById(Integer id);
&nbsp;
}</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">package com.serunix.model.services;
&nbsp;
import java.util.List;
&nbsp;
import com.serunix.model.Medicament;
&nbsp;
/**
 * @author serunix
 * 
 */
public interface MedicamentDaoImpl {
&nbsp;
	List<span style="color: #009900;">&lt;?&gt;</span> getAllMedicaments();
&nbsp;
	Medicament getMedicamentById(Integer id);
&nbsp;
	int update(Medicament medicament);
&nbsp;
	Boolean insert(Medicament medicament);
&nbsp;
	int delete(Integer id);
}</pre></td></tr></table></div>

<p>3.- Los Daos.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">package com.serunix.model.daos;
&nbsp;
import java.util.List;
&nbsp;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
&nbsp;
import com.serunix.model.Recipe;
import com.serunix.model.services.RecipeDaoImpl;
/**
 * @author serunix
 *
 */
public class RecipeDao extends SqlMapClientDaoSupport implements RecipeDaoImpl {
&nbsp;
&nbsp;
	public List<span style="color: #009900;">&lt;?&gt;</span> getAllRecipes() {
		return (List<span style="color: #009900;">&lt;?&gt;</span>)getSqlMapClientTemplate().queryForList(&quot;Recipe.getAllRecipes&quot;, null);
	}
&nbsp;
	public Recipe getRecipeById(Integer id) {		
	    return (Recipe)getSqlMapClientTemplate().queryForObject(&quot;Recipe.getRecipeById&quot;, id);	    
	 }
}</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">package com.serunix.model.daos;
&nbsp;
import java.util.List;
&nbsp;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
&nbsp;
import com.serunix.model.Medicament;
import com.serunix.model.services.MedicamentDaoImpl;
/**
 * @author serunix
 *
 */
public class MedicamentDao extends SqlMapClientDaoSupport implements MedicamentDaoImpl {
&nbsp;
	 public List<span style="color: #009900;">&lt;?&gt;</span> getAllMedicaments() {
	        return (List<span style="color: #009900;">&lt;?&gt;</span>) getSqlMapClientTemplate().queryForList(&quot;getAllMedicaments&quot;, null);
	    }
	    public Medicament getMedicamentById(Integer id) {
	        return ((Medicament)getSqlMapClientTemplate().queryForObject(&quot;getMedicamentById&quot;, id));
	    }
	    public int update(Medicament medicament) {
	        return getSqlMapClientTemplate().update(&quot;update&quot;, medicament);
	    }
	    public Boolean insert(Medicament medicament) {
	        return (Boolean)getSqlMapClientTemplate().insert(&quot;insert&quot;, medicament);   
	    }
	    public int delete(Integer id) {
	        return (int)getSqlMapClientTemplate().delete(&quot;delete&quot;, id);
	    }
}</pre></td></tr></table></div>

<p>4.- Los mapeos.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?xml <span style="color: #000066;">version</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1.0&quot;</span> encoding<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UTF-8&quot;</span>?&gt;</span>
&nbsp;
<span style="color: #00bbdd;">&lt;!DOCTYPE sqlMap PUBLIC &quot;-//iBATIS.com//DTD SQL Map 2.0//EN&quot; &quot;http://www.ibatis.com/dtd/sql-map-2.dtd&quot;&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;sqlMap namespace<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Medicament&quot;</span>&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;cacheModel <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeCache&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;MEMORY&quot;</span> <span style="color: #000066;">readOnly</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> &gt;</span>
        <span style="color: #009900;">&lt;flushInterval hours<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;24&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>cacheModel&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;resultMap <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;com.serunix.model.Medicament&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;medicamentsMap&quot;</span>&gt;</span>
      <span style="color: #009900;">&lt;result property<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;medicamentId&quot;</span></span>
<span style="color: #009900;">              column<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;medicamentId&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
      <span style="color: #009900;">&lt;result property<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name&quot;</span></span>
<span style="color: #009900;">              column<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>  
      <span style="color: #009900;">&lt;result property<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;description&quot;</span></span>
<span style="color: #009900;">              column<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;description&quot;</span><span style="color: #66cc66;">/</span>&gt;</span> 
&nbsp;
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>resultMap&gt;</span>
&nbsp;
&nbsp;
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">select</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;findMedicaments&quot;</span>  parameterClass<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;java.lang.Integer&quot;</span> resultMap<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;medicamentsMap&quot;</span> cacheModel<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeCache&quot;</span>&gt;</span>
    	SELECT * FROM tcmedicaments  WHERE recipeId = #id#;
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">select</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>sqlMap&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?xml <span style="color: #000066;">version</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1.0&quot;</span> encoding<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UTF-8&quot;</span>?&gt;</span>
&nbsp;
<span style="color: #00bbdd;">&lt;!DOCTYPE sqlMap PUBLIC &quot;-//iBATIS.com//DTD SQL Map 2.0//EN&quot; &quot;http://www.ibatis.com/dtd/sql-map-2.dtd&quot;&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;sqlMap namespace<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Recipe&quot;</span>&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;cacheModel <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeCache&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;MEMORY&quot;</span> <span style="color: #000066;">readOnly</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> &gt;</span>
        <span style="color: #009900;">&lt;flushInterval hours<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;24&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>cacheModel&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;resultMap <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;com.serunix.model.Recipe&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeMap&quot;</span>&gt;</span>
      <span style="color: #009900;">&lt;result property<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeId&quot;</span></span>
<span style="color: #009900;">              column<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeId&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
      <span style="color: #009900;">&lt;result property<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;patientName&quot;</span></span>
<span style="color: #009900;">              column<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;patientName&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>  
      <span style="color: #009900;">&lt;result property<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;medicaments&quot;</span></span>
<span style="color: #009900;">              column<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeId&quot;</span> select<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Medicament.findMedicaments&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>                                
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>resultMap&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">select</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;getRecipeById&quot;</span> parameterClass<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;java.lang.Integer&quot;</span>  resultMap<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeMap&quot;</span> cacheModel<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeCache&quot;</span>&gt;</span>
&nbsp;
        SELECT * FROM trrecipes  WHERE recipeId = #id#;
&nbsp;
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">select</span>&gt;</span>    
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>sqlMap&gt;</span></pre></td></tr></table></div>

<p>5.- Y bueno lo más importante creo yo, el spring-context.xml</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?xml <span style="color: #000066;">version</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1.0&quot;</span> encoding<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UTF-8&quot;</span>?&gt;</span>
<span style="color: #00bbdd;">&lt;!DOCTYPE beans PUBLIC &quot;-//SPRING//DTD BEAN//EN&quot;</span>
<span style="color: #00bbdd;">        &quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;beans&gt;</span>
    <span style="color: #009900;">&lt;bean <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dataSource&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;org.springframework.jdbc.datasource.DriverManagerDataSource&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;property <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;driverClassName&quot;</span>&gt;&lt;value&gt;</span>com.mysql.jdbc.Driver<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>value&gt;&lt;<span style="color: #66cc66;">/</span>property&gt;</span>
        <span style="color: #009900;">&lt;property <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span>&gt;&lt;value&gt;</span>jdbc:mysql://127.0.0.1/SU BASE<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>value&gt;&lt;<span style="color: #66cc66;">/</span>property&gt;</span>
        <span style="color: #009900;">&lt;property <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;username&quot;</span>&gt;&lt;value&gt;</span>SU USUARIO<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>value&gt;&lt;<span style="color: #66cc66;">/</span>property&gt;</span>
        <span style="color: #009900;">&lt;property <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;password&quot;</span>&gt;&lt;value&gt;</span>SU PASSWORD<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>value&gt;&lt;<span style="color: #66cc66;">/</span>property&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>bean&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;bean <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sqlMapClient&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;org.springframework.orm.ibatis.SqlMapClientFactoryBean&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;property <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dataSource&quot;</span>&gt;&lt;ref bean<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dataSource&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span>property&gt;</span>
        <span style="color: #009900;">&lt;property <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;configLocation&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;value&gt;</span>classpath:SqlMapConfig.xml<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>value&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>property&gt;</span>
        <span style="color: #009900;">&lt;property <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;useTransactionAwareDataSource&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;value&gt;</span>true<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>value&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>property&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>bean&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;bean <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipeDao&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;com.serunix.model.daos.RecipeDao&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;property <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sqlMapClient&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;ref bean<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sqlMapClient&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>property&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>bean&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>beans&gt;</span></pre></td></tr></table></div>

<p>y bueno aquí les dejo mi clase main&#8230;.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">package test;
&nbsp;
import java.util.Iterator;
&nbsp;
import org.apache.log4j.Logger;
import org.springframework.context.support.ClassPathXmlApplicationContext;
&nbsp;
import com.serunix.model.Medicament;
import com.serunix.model.Recipe;
import com.serunix.model.daos.RecipeDao;
&nbsp;
/**
 * @author serunix
 *
 */
public class TestDaos {
	protected static Logger logger = Logger.getLogger(TestDaos.class);
&nbsp;
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		ClassPathXmlApplicationContext ctxt = new ClassPathXmlApplicationContext(&quot;spring-context.xml&quot;);
		RecipeDao repl = (RecipeDao) ctxt.getBean(&quot;recipeDao&quot;);
		Recipe recipe = (Recipe)repl.getRecipeById(1);
		Iterator<span style="color: #009900;">&lt;?&gt;</span> iteRecipe = recipe.getMedicaments().iterator();
		logger.info(&quot; Recipe No. &quot; + recipe.getRecipeId() + &quot; \n&quot;);
		logger.info(&quot; Patient Name: &quot; + recipe.getPatientName() + &quot; \n&quot;);
		while (iteRecipe.hasNext())
		{
			Medicament medicament = (Medicament)iteRecipe.next();
			logger.info(&quot; ----- Medicaments ------------- \n&quot;);
			logger.info(medicament.getMedicamentId() + &quot;.- Name: &quot;+ medicament.getName() +&quot; \n&quot;);
			logger.info( &quot;\t Description: &quot;+ medicament.getDescription() +&quot; \n&quot;);
&nbsp;
		}
&nbsp;
	}
&nbsp;
}</pre></td></tr></table></div>

<p>aquí les dejo el proyecto completo por si tienen algúna duda&#8230;<a onclick="javascript: pageTracker._trackPageview ('/outgoing/proyecto_ibatis');" href="http://www.serunix.com/wp-content/uploads/SERUNIX-TESTIBATIS.rar"> PROYECTO TESTIBATIS</a><br />
n
<div>n
<div>
	<div class='democracy'>
		<strong class="poll-question">¿Qué framework de percistencia utilizas para  la DB?</strong>
		<div class='dem-results'>
		<form action='http://www.serunix.com/wp-content/plugins/democracy/democracy.php' onsubmit='return dem_Vote(this)'>
		<ul>
			<li>
					<input type='radio' id='dem-choice-49' value='49' name='dem_poll_9' />
					<label for='dem-choice-49'>iBatis</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-48' value='48' name='dem_poll_9' />
					<label for='dem-choice-48'>Hibernate</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-50' value='50' name='dem_poll_9' />
					<label for='dem-choice-50'>Toplink</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-52' value='52' name='dem_poll_9' />
					<label for='dem-choice-52'>No sé que es eso...</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-53' value='53' name='dem_poll_9' />
					<label for='dem-choice-53'>No lo recuerdo</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-54' value='54' name='dem_poll_9' />
					<label for='dem-choice-54'>No soy Informático</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-51' value='51' name='dem_poll_9' />
					<label for='dem-choice-51'>Enterprise Object Framework</label>
			</li>
		</ul>
			<input type='hidden' name='dem_poll_id' value='9' />
			<input type='hidden' name='dem_action' value='vote' />
			<input type='submit' class='dem-vote-button' value='Vote' />
			<a href="http://www.serunix.com/tag/java/feed?dem_action=view&amp;dem_poll_id=9" onclick='return dem_getVotes("http://www.serunix.com/wp-content/plugins/democracy/democracy.php?dem_action=view&amp;dem_poll_id=9", this)' rel='nofollow' class='dem-vote-link'>View Results</a>
		</form>
		</div>
	</div></div>
</div>
<p>G2ZXWXZKCVA3</p>
<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(566, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_566_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_566_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2009/12/22/base-de-datos-un-ejemplo-de-ibatis-con-spring-en-java/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Open Source: para que nos puede servir OpenWorkFlow?</title>
		<link>http://www.serunix.com/2009/12/17/open-source-para-que-nos-puede-servir-openworkflow</link>
		<comments>http://www.serunix.com/2009/12/17/open-source-para-que-nos-puede-servir-openworkflow#comments</comments>
		<pubDate>Thu, 17 Dec 2009 21:15:51 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Educación]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=562</guid>
		<description><![CDATA[OpenWorkFlow es un software que se utiliza, para modelar nuestros procesos de negocio por medio de UML. Hace tiempo utilice este software que me pareció interesante ya que te ayuda a saber, en que proceso y/o actor causaba un cuello de botella y así poder realizar una reingeniería con base a nuestras reglas de negocios [...]]]></description>
			<content:encoded><![CDATA[<p>OpenWorkFlow es un software que se utiliza, para modelar nuestros procesos de negocio por medio de UML. Hace tiempo utilice este software que me pareció interesante ya que te ayuda a saber, en que proceso y/o actor causaba un cuello de botella y así poder realizar una reingeniería con base a nuestras reglas de negocios o realizar una automatización (en caso que el proceso se realice de forma manual). Esta herramienta se puede implementar en varios lenguajes de programación como Java y Php, así que les recomiendo que lo prueben.</p>
<p><a href="http://www.openwflow.com/"></a></p>
<div class="wp-caption alignnone" style="width: 348px"><a href="http://www.serunix.com/fotos/main.php?g2_itemId=506"><img title="openWF" src="http://www.serunix.com/fotos/main.php?g2_view=core.DownloadItem&amp;g2_itemId=506&amp;g2_serialNumber=1" alt="openWF" width="338" height="363" /></a><p class="wp-caption-text">openFW</p></div>
<p>ahhh recuerden que en nuestra plantación estratégica, hay que tener en cuenta que tenemos que invertir el 80% del tiempo en el análisis y el 20% sólo en la ejecución en los procesos tomando en cuenta: nuestra metodología, nivel tecnológico, tamaño de la compañía, ingresos, etc.</p>
<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(562, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_562_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_562_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2009/12/17/open-source-para-que-nos-puede-servir-openworkflow/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parte I: Cómo obtener los resultados de una búsqueda con JAVA, utilizando el API de spotify ???</title>
		<link>http://www.serunix.com/2009/11/09/parte-i-como-obtener-los-resultados-de-una-busqueda-con-java-utilizando-el-api-de-spotify</link>
		<comments>http://www.serunix.com/2009/11/09/parte-i-como-obtener-los-resultados-de-una-busqueda-con-java-utilizando-el-api-de-spotify#comments</comments>
		<pubDate>Tue, 10 Nov 2009 03:12:49 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=536</guid>
		<description><![CDATA[Ha estas alturas como todos ya saben, se ha liberado el API de Spotify para poder obtener los resultados de sus albums, artistas, etc. etc. y bueno, aquí un simple/básico ejemplo de como obtener los resultados si buscamos la palabra &#8220;thriller&#8221;, por medio de JAVA. Pero como hemos empezado con este ejemplo se me ha [...]]]></description>
			<content:encoded><![CDATA[<p>Ha estas alturas como todos ya saben, se ha liberado el <a href="http://developer.spotify.com/en/">API de Spotify</a> para poder obtener los resultados de sus <em>albums</em>, artistas, etc. etc.  y bueno, aquí un simple/básico  ejemplo de como obtener los resultados si buscamos la palabra &#8220;thriller&#8221;, por medio de JAVA. Pero como hemos empezado con este ejemplo se me ha ocurrido crear el xsd  y además crear los objetos, así que esta es la primera entrega.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.BufferedReader</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.IOException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.InputStreamReader</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.net.MalformedURLException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.net.URL</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #008000; font-style: italic; font-weight: bold;">/**
 * @author sergio
 * 
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SpotifyTest <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #008000; font-style: italic; font-weight: bold;">/**
	 * @param args
	 * @throws IOException
	 */</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">IOException</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003399;">URL</span> url <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">URL</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://ws.spotify.com/search/1/album?q=thriller&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #003399;">BufferedReader</span> xml <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">BufferedReader</span><span style="color: #009900;">&#40;</span>
					<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">InputStreamReader</span><span style="color: #009900;">&#40;</span>url.<span style="color: #006633;">openStream</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #003399;">String</span> line<span style="color: #339933;">;</span>
			<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>line <span style="color: #339933;">=</span> xml.<span style="color: #006633;">readLine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>line<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">MalformedURLException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// TODO Auto-generated catch block</span>
			e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #666666; font-style: italic;">// TODO Auto-generated method stub</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(536, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_536_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_536_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2009/11/09/parte-i-como-obtener-los-resultados-de-una-busqueda-con-java-utilizando-el-api-de-spotify/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Una forma de recargar/reload/refreshing un archivo properties con Spring</title>
		<link>http://www.serunix.com/2009/11/08/una-forma-de-recargarreloadrefreshing-un-archivo-properties-con-spring</link>
		<comments>http://www.serunix.com/2009/11/08/una-forma-de-recargarreloadrefreshing-un-archivo-properties-con-spring#comments</comments>
		<pubDate>Mon, 09 Nov 2009 02:54:36 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=528</guid>
		<description><![CDATA[Hay muchisisisisimas formas de hacer esto, y una de ellas es hacerlo con spring y sólo hay que definir los siguientes beans en el spring-context de la aplicación y este se encargara de hacer el reload en el tiempo que se le defina. Aquí les dejo su API. 1 2 3 4 5 6 7 [...]]]></description>
			<content:encoded><![CDATA[<p>Hay muchisisisisimas formas de hacer esto, y una de ellas es hacerlo con <em>spring</em> y sólo hay que definir los siguientes <em>beans</em> en el <em>spring-context</em> de la aplicación y este se encargara de hacer el <em>reload</em> en el tiempo que se le defina. Aquí les dejo su <a href="http://static.springsource.org/spring/docs/2.0.8/api/org/springframework/context/support/ResourceBundleMessageSource.html">API</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;baseMessageSource&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.springframework.context.support.ResourceBundleMessageSource&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;basename&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>classpath:Application<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #808080; font-style: italic;">&lt;!-- messageSource,  spring lo tiene definido para los archivos properties, así que no hay que cambiarlo --&gt;</span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;messageSource&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.springframework.context.support.ReloadableResourceBundleMessageSource&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;basenames&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>classpath:Application<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;parentMessageSource&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ref</span> <span style="color: #000066;">bean</span>=<span style="color: #ff0000;">&quot;baseMessageSource&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;cacheSeconds&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
       <span style="color: #808080; font-style: italic;">&lt;!-- En este caso cada 60 segundos --&gt;</span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>60<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(528, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_528_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_528_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2009/11/08/una-forma-de-recargarreloadrefreshing-un-archivo-properties-con-spring/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IntelliJ IDEA: una propuesta de IDE para desarrollar&#8230;</title>
		<link>http://www.serunix.com/2009/11/03/intellij-idea-una-propuesta-de-ide-para-desarrollar</link>
		<comments>http://www.serunix.com/2009/11/03/intellij-idea-una-propuesta-de-ide-para-desarrollar#comments</comments>
		<pubDate>Tue, 03 Nov 2009 22:58:34 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=525</guid>
		<description><![CDATA[Buscado algunas cosas por Internet me encontré con este IDE que se llama IntelliJ IDEA y se encuentra actualmente en la versión 8  la verdad es que se ve muy bien, esta desarrollado en Java y soporta varios lenguajes para poder desarrollar, lo estoy probando pero la verdad es que cuando uno se acostumbra a [...]]]></description>
			<content:encoded><![CDATA[<p>Buscado algunas cosas por Internet me encontré con este IDE que se llama <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a> y se encuentra actualmente en la versión 8  la verdad es que se ve muy bien, esta desarrollado en Java y soporta varios lenguajes para poder desarrollar, lo estoy probando pero la verdad es que cuando uno se acostumbra a uno <del datetime="2009-11-03T22:44:01+00:00">eclipse</del> es difícil agarrarle al onda a otro, en fin&#8230; lo único malo es que es de pago pero también su puede obtener una licencia Open Soucre cumpliendo ciertos requisitos.  <img src='http://www.serunix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="wp-caption alignnone" style="width: 410px"><a href="http://www.serunix.com/fotos/main.php?g2_itemId=496"><img title="IntelliJ IDEA" src="http://www.serunix.com/fotos/main.php?g2_view=core.DownloadItem&amp;g2_itemId=496&amp;g2_serialNumber=1" alt="IntelliJ IDEA" width="400" height="299" /></a><p class="wp-caption-text">IntelliJ IDEA</p></div>
<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(525, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_525_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_525_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2009/11/03/intellij-idea-una-propuesta-de-ide-para-desarrollar/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Un Tablibs para mostrar un determinado formato de fechas en struts&#8230;</title>
		<link>http://www.serunix.com/2009/10/20/un-tablibs-para-mostrar-un-determinado-formato-de-fechas-en-struts</link>
		<comments>http://www.serunix.com/2009/10/20/un-tablibs-para-mostrar-un-determinado-formato-de-fechas-en-struts#comments</comments>
		<pubDate>Tue, 20 Oct 2009 12:50:34 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Struts1]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=507</guid>
		<description><![CDATA[Para todos aquellos que necesitan diferentes formatos, para las fechas y que las quieran mostrar en la Jsp&#8217;s, pues existe un Tablibs que pueden hacer todo eso, claro que esto se podría hacer de diferentes formas pero cada uno decide en fin&#8230; aquí les dejo el link además que tiene ejemplos Format Pattern                    Result &#8212;&#8212;&#8212;&#8212;&#8211;                    [...]]]></description>
			<content:encoded><![CDATA[<p>Para todos aquellos que necesitan diferentes formatos, para las fechas y que las quieran mostrar en la Jsp&#8217;s,<br />
pues existe un Tablibs que pueden  hacer todo eso,  claro que esto se podría hacer de diferentes formas pero cada uno decide <img src='http://www.serunix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  en fin&#8230; aquí les dejo el <a href="http://jakarta.apache.org/taglibs/doc/datetime-doc/datetime-1.0/index.html" TARGET="_blank" >link </a>además que tiene ejemplos <img src='http://www.serunix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Format Pattern                    Result<br />
&#8212;&#8212;&#8212;&#8212;&#8211;                    &#8212;&#8212;-<br />
&#8220;yyyy.MM.dd G &#8216;at&#8217; hh:mm:ss z&#8221;    1996.07.10 AD at 15:08:56 PDT<br />
&#8220;EEE, MMM d, &#8221;yy&#8221;                Wed, July 10, &#8217;96<br />
&#8220;h:mm a&#8221;                          12:08 PM<br />
&#8220;hh &#8216;o&#8221;clock&#8217; a, zzzz&#8221;           12 o&#8217;clock PM, Pacific Daylight Time<br />
&#8220;K:mm a, z&#8221;                       0:00 PM, PST<br />
&#8220;yyyyy.MMMMM.dd GGG hh:mm aaa&#8221;    1996.July.10 AD 12:08 PM</p>
<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(507, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_507_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_507_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2009/10/20/un-tablibs-para-mostrar-un-determinado-formato-de-fechas-en-struts/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Choose unique values for the &#8216;webAppRootKey&#8217; context-param in your web.xml files! &#8211; with nested exception:</title>
		<link>http://www.serunix.com/2009/09/04/choose-unique-values-for-the-webapprootkey-context-param-in-your-web-xml-files-with-nested-exception</link>
		<comments>http://www.serunix.com/2009/09/04/choose-unique-values-for-the-webapprootkey-context-param-in-your-web-xml-files-with-nested-exception#comments</comments>
		<pubDate>Fri, 04 Sep 2009 19:15:42 +0000</pubDate>
		<dc:creator>sergio</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://www.serunix.com/?p=437</guid>
		<description><![CDATA[Teníamos el siguiente error&#8230; eso pasa por que el servidor tiene dos aplicaciones y no tiene un identificador&#8230;. este error se soluciona agregando las siguientes lineas en el web.xml de las aplicaciones&#8230; 1 2 3 4 &#60;context-param&#62; &#60;param-name&#62;webAppRootKey&#60;/param-name&#62; &#60;param-value&#62;id_unique&#60;/param-value&#62; &#60;/context-param&#62; y apropósito: n n ¿Qué servidor de aplicaciones web utilizas? Tomcat, es el bueno Jboss [...]]]></description>
			<content:encoded><![CDATA[<p>Teníamos el siguiente error&#8230; eso pasa por que el servidor tiene dos aplicaciones y no tiene un identificador&#8230;. este error se soluciona agregando las siguientes lineas en el web.xml de las aplicaciones&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;context-param&gt;</span>
       <span style="color: #009900;">&lt;param-name&gt;</span>webAppRootKey<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>param-name&gt;</span>
       <span style="color: #009900;">&lt;param-value&gt;</span>id_unique<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>param-value&gt;</span>
 <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>context-param&gt;</span></pre></td></tr></table></div>

<p>y apropósito:<br />
n
<div>n
<div>
	<div class='democracy'>
		<strong class="poll-question">¿Qué servidor de aplicaciones web utilizas?</strong>
		<div class='dem-results'>
		<form action='http://www.serunix.com/wp-content/plugins/democracy/democracy.php' onsubmit='return dem_Vote(this)'>
		<ul>
			<li>
					<input type='radio' id='dem-choice-40' value='40' name='dem_poll_8' />
					<label for='dem-choice-40'>Tomcat, es el bueno</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-43' value='43' name='dem_poll_8' />
					<label for='dem-choice-43'>Jboss</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-44' value='44' name='dem_poll_8' />
					<label for='dem-choice-44'>IBM websphere</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-45' value='45' name='dem_poll_8' />
					<label for='dem-choice-45'>Apache</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-41' value='41' name='dem_poll_8' />
					<label for='dem-choice-41'>IIS, yo sólo microsoft</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-47' value='47' name='dem_poll_8' />
					<label for='dem-choice-47'>Yo no los utilizo</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-42' value='42' name='dem_poll_8' />
					<label for='dem-choice-42'>Weblogic</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-46' value='46' name='dem_poll_8' />
					<label for='dem-choice-46'>Sun One</label>
			</li>
		</ul>
			<input type='hidden' name='dem_poll_id' value='8' />
			<input type='hidden' name='dem_action' value='vote' />
			<input type='submit' class='dem-vote-button' value='Vote' />
			<a href="http://www.serunix.com/tag/java/feed?dem_action=view&amp;dem_poll_id=8" onclick='return dem_getVotes("http://www.serunix.com/wp-content/plugins/democracy/democracy.php?dem_action=view&amp;dem_poll_id=8", this)' rel='nofollow' class='dem-vote-link'>View Results</a>
		</form>
		</div>
	</div></div>
</div>
<div class="thanks_button_div" style="float: left; margin-right: 10px;"><div style="float: left; display: inline;"><input type="button" onclick="thankYouButtonClick(437, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thank You: 0"
                class="thanks_button thanks_custom_button "
                style="background-image:url(http://b.static.ak.fbcdn.net/rsrc.php/yp/r/qDH1xoDhFBF.gif);width:15px; height:13px; font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                id="thanksButton_437_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/></div><div id="ajax_loader_437_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://www.serunix.com/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.serunix.com/2009/09/04/choose-unique-values-for-the-webapprootkey-context-param-in-your-web-xml-files-with-nested-exception/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

