<?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: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-3265551620225769141</id><updated>2011-11-28T01:07:49.330+01:00</updated><category term='Embedded JBoss seam'/><category term='jboss devstudio studio'/><category term='trac subversion apache2'/><category term='mylyn trac'/><category term='JBoss JSFUnit'/><category term='JBoss guide'/><category term='taylor model management'/><category term='jboss seam'/><category term='ejb3 annotations curso'/><category term='2see'/><category term='curso seam testng'/><category term='hibernate preupdate prepersist'/><category term='test entitymanager jta transaction'/><category term='JBoss RichFaces Download'/><category term='maven'/><category term='hibernate cascade'/><category term='hibernate3:hbm2ddl'/><category term='hermes ldap taylor'/><category term='svn merge branches'/><category term='embedded JBoss maven2'/><category term='java interfaces'/><category term='seam exceptions'/><category term='seam blog'/><category term='ip'/><category term='Taylor UML stereotype'/><category term='Billy Bragg Great Leap Forwards'/><category term='test'/><category term='maven seam'/><category term='log4j procesos hermes'/><category term='jboss seam gwt'/><category term='curso seam'/><category term='testng'/><category term='seam arquitectura jsf ejb3'/><category term='seam was7 websphere deploy'/><category term='taylor plugins'/><category term='websphere was7'/><category term='websphere maven deploy jee5'/><category term='websphere'/><category term='agile metodologías'/><category term='hermes encoding'/><category term='seam maven template'/><category term='jsf CustomComponents'/><category term='JEE5 tutorial'/><category term='huevo celula'/><category term='JasperReports iReport'/><category term='MDA Taylor TestDrivenModeling'/><category term='todo'/><category term='hibernate procesos batch'/><category term='seamgen'/><category term='seam-gen maven'/><category term='hibernate persistencia transacciones entitymanager jpa'/><category term='seam hibernate jpa session'/><category term='apache Jackrabbit'/><category term='hermes unique validator'/><category term='seam test testng'/><category term='hudson svn hook trac'/><category term='Taylor'/><category term='beans stateless stateful'/><category term='eclipse seam maven2 structure sources'/><category term='seam locale message bundles i8ln'/><category term='NamedQueries seam'/><category term='beped'/><category term='JOPR'/><category term='hibernate validation complexrules'/><category term='core seam reference'/><category term='webbeans seam'/><category term='eclipse UML DDL codegeneration'/><category term='taylor modify'/><category term='jpa annotations toplink oracle'/><category term='Embedded JBoss Tomcat6'/><category term='seam'/><category term='cultura tour palacioreal'/><category term='hibernate reverse engineering hbm2java'/><category term='seam entity'/><category term='seam JavaBeans'/><category term='web beans'/><category term='proxy fiddler'/><category term='loteria'/><category term='seam eclipse importar ejemplos'/><category term='hibernate exceptions'/><category term='test testng maven'/><category term='ejb3 specification'/><category term='seam jboss hermes'/><category term='seam file download'/><category term='tomcat maven plugin'/><category term='taylor agile development environment'/><category term='mysql sqlwave'/><category term='constraints'/><category term='JPA DDL'/><category term='JSFUnit'/><category term='hsqldb'/><category term='seam validation pattern regexp'/><category term='seam transaction'/><category term='jpa'/><category term='seam reference 2see'/><category term='persistence.xml persistence entities'/><category term='seam stateless slsb'/><category term='jpa persist transaction entity'/><category term='songbird'/><category term='dzone netbeans jboss seam maven'/><category term='seam hibernate ejb3 annotations'/><category term='notario'/><category term='uml 2see'/><category term='gripe teresa forcades'/><category term='JasperReports web servlet'/><category term='taylor eclipse svn'/><category term='jboss seam eclipse'/><category term='eclipse plugins'/><category term='dvdstore seam'/><category term='pspad'/><category term='hello'/><category term='jbosstools updatesite'/><category term='manuales'/><category term='test arquilian testng maven'/><category term='vuelta al blog'/><category term='seam sfsb'/><category term='ajax jaxer aptana'/><category term='hibernate seam'/><category term='palestina'/><category term='embedded maven2'/><category term='hibernate query hints'/><category term='java annotations'/><category term='gwt spring jfaces struts'/><category term='DDD Repositories'/><category term='seam tutorial'/><category term='ejb3 annotations'/><category term='hibernate validation groups object references'/><category term='Metodologias TDD TestDrivenDesign TestDrivenDevelopment'/><category term='beped java parse fixed-length files'/><category term='arquilian hermes testng'/><category term='hibernate orm persistence'/><category term='NamedQuery Ping'/><category term='jasperReports Seam'/><category term='frameworks'/><category term='seam errorMessages'/><category term='java utils'/><category term='seam transactionmanager BMT'/><category term='dailyPost'/><category term='persistencia transaccion hibernate'/><category term='taylor jpa ddl maven'/><category term='DDD'/><category term='gwt-maven'/><category term='seam transaction ApplicationException'/><category term='exceptios seam'/><category term='gestion proyectos'/><category term='maven jbossTools eclipse'/><category term='eclipsewiki wiki'/><category term='snooker'/><category term='seam fileupload'/><category term='hibernate isolation level'/><category term='transaction'/><category term='DDD Aggregates'/><category term='fin del proyecto RSI mobile'/><category term='beped xml parsers'/><category term='stereotypes RSA UML'/><category term='seam SFSB stateful conversations'/><category term='seam resources properties sql externalizar'/><category term='jboss hibernate demo'/><category term='Facelets JSF Jasper'/><category term='seam maven'/><category term='music'/><category term='hibernate exporters'/><category term='Taylor Metodologias TDD TestDrivenDesign TestDrivenDevelopment'/><category term='maven2 jboss plugin deploy start'/><category term='jboss tools'/><category term='hibernate annotations'/><category term='Jet Screenshot screen capture'/><category term='DDD Factories'/><category term='DownloadHelper'/><category term='eclipse jboss tools'/><category term='java jar dependencies libraries ClassNotFoundException'/><category term='jboss'/><category term='taylor validation expressions hibernate'/><category term='eclipse UML HiberObjects DDL codegeneration'/><category term='issue tracking'/><category term='jpa properties'/><category term='maven2 release version plugin'/><category term='ftp'/><category term='netbeans maven'/><category term='hermes'/><title type='text'>just my notes...</title><subtitle type='html'>blog to recollect different kinf of data, comments, todo's, and make it easily avalaible from the web</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default?start-index=101&amp;max-results=100'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>276</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7464549875677487162</id><published>2010-08-19T23:49:00.003+02:00</published><updated>2010-08-20T00:17:48.735+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='huevo celula'/><title type='text'>¿Un huevo de gallina es una célula?</title><content type='html'>&lt;span style="color: rgb(0, 102, 0); font-weight: bold;font-size:130%;" &gt;¿Un huevo de gallina es una célula?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Primero habría que aclararte que todas las células sin excpeción poseen  tamaños microscópicos del orden de micras debido a factores físicos que  impiden un crecimiento unitario celular mayor; y segundo creo que tienes  algo de problema con el desarrollo embrionario, te aclaro que cuando  vez al huevo como tal, este ya ha sufrido un proceso de predesarrollo al  interior de la gallina mediante el cual el cigoto inicial sufre una  serie (millones) de divisiones mitoticas que producen un tejido  embrionario bastante considerable que es el que finalmente ocupa la yema  del huevo mientras la clara es tejido nutricio (nutrición), de modo que  en general el huevo como tal podría decirse es un agregado celular  embrionario en un estadío post-inicial medio sin producción de tejidos  especializados.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Creo que has sido víctima de uno de los grandes errores de la lingüística en la Biología:&lt;br /&gt;&lt;br /&gt;El huevo no es una célula, antiguamente maestros confundían a sus  estudiantes haciendo esta analogía entre huevo y célula pretendiendo  solamente hacer una comparación debido a la forma y composición de este  yema = núcleo; clara=citoplasma; cascara = membrana celular) y este  error se multiplico en el tiempo.&lt;br /&gt;&lt;br /&gt;Actualmente hay quienes aun piensan que el huevo es una célula, pero en  realidad no lo es, esta conformado por millones de ellas.&lt;br /&gt;&lt;br /&gt;fuente: http://es.answers.yahoo.com/question/index?qid=20080501201533AA46Shr&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;----&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span style="font-family: &amp;quot;Arial Black&amp;quot;;"&gt;Es una mancha blanca pequeña, redonda, opaca, situada en la superficie de la yema del huevo. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span style="font-family: &amp;quot;Arial Black&amp;quot;;"&gt;&lt;span style=""&gt;       &lt;/span&gt;Está formado por la unión de una sola célula producida en el ovario de la hembra y otra célula de esperma producida por el macho.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span style="font-family: &amp;quot;Arial Black&amp;quot;;"&gt;&lt;span style=""&gt;       &lt;/span&gt;La célula hembra contiene la mitad del número total de cromosomas (información genética) y la célula masculina la otra mitad.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;b style=""&gt;&lt;span style="font-family: &amp;quot;Arial Black&amp;quot;;"&gt;&lt;span style=""&gt;       &lt;/span&gt;Después de la fusión o fertilización de las dos mitades la célula resultante se divide en dos, estas dos células crecen y se dividen una y otra vez hasta que el huevo sale al exterior. La masa de células es visible como el disco germinal. Durante la incubación esta masa de células crecerá, se dividirá y especializará para formar el polluelo, y usará el resto de los volúmenes del huevo como comida.&lt;span style=""&gt;  &lt;br /&gt;&lt;br /&gt;fuente: &lt;a href="http://muticus-pina.com/huevo/huevo.htm"&gt;http://muticus-pina.com/huevo/huevo.htm&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7464549875677487162?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7464549875677487162/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7464549875677487162' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7464549875677487162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7464549875677487162'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/08/un-huevo-de-gallina-es-una-celula.html' title='¿Un huevo de gallina es una célula?'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-478083989906546748</id><published>2010-05-29T22:53:00.000+02:00</published><updated>2010-05-29T22:54:42.964+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='beped'/><title type='text'>beped: @create</title><content type='html'>probar  @Create en el componente propertyConfigurator&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-478083989906546748?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/478083989906546748/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=478083989906546748' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/478083989906546748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/478083989906546748'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/beped-create.html' title='beped: @create'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8075758053393422951</id><published>2010-05-29T22:51:00.000+02:00</published><updated>2010-05-29T22:53:55.979+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hermes encoding'/><title type='text'>hermes: Character encoding</title><content type='html'>&lt;span style="font-weight: bold;font-size:130%;" &gt;30.1.4.5. Character encoding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sets the character encoding of submitted form data.&lt;br /&gt;This filter is not installed by default and requires an entry in components.xml to enable it:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;web:character-encoding-filter encoding="UTF-16"&lt;br /&gt;                             override-client="true"&lt;br /&gt;                             url-pattern="*.seam"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;• encoding — The encoding to use.&lt;br /&gt;• override-client —  If  this  is  set  to  true,  the  request  encoding will  be  set  to whatever  is&lt;br /&gt;specified by encoding no matter whether the request already specifies an encoding or not. If&lt;br /&gt;set  to false,  the  request encoding will only be set  if  the  request doesn't already specify an&lt;br /&gt;encoding. The default setting is false.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8075758053393422951?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8075758053393422951/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8075758053393422951' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8075758053393422951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8075758053393422951'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/hermes-character-encoding.html' title='hermes: Character encoding'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6894653174567719559</id><published>2010-05-08T15:51:00.001+02:00</published><updated>2010-05-08T15:53:30.994+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam maven'/><title type='text'>Configuring a Seam EJB project  for development with Maven and JBoss Tools</title><content type='html'>&lt;h2 class="title"&gt;                 &lt;a href="http://blog.xebia.com/2009/06/06/configuring-a-seam-ejb-project-for-development-with-maven-and-jboss-tools/" rel="bookmark" title="Permanent Link to Configuring a Seam EJB project  for development with Maven and JBoss Tools"&gt;Configuring a Seam EJB  project for development with Maven and JBoss Tools&lt;/a&gt;&lt;br /&gt;                      &lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6894653174567719559?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6894653174567719559/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6894653174567719559' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6894653174567719559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6894653174567719559'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/configuring-seam-ejb-project-for.html' title='Configuring a Seam EJB project  for development with Maven and JBoss Tools'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6529899330738207117</id><published>2010-05-07T21:50:00.000+02:00</published><updated>2010-05-07T21:51:36.848+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='beped java parse fixed-length files'/><title type='text'>java parse fixed-length files (2)</title><content type='html'>&lt;a href="http://jsapar.tigris.org/"&gt;http://jsapar.tigris.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Mission&lt;/h3&gt;  &lt;p&gt;The goal of this project is to create a java library that contains a  parser of flat files and csv files. The library should be simple to use  and possible to extend. &lt;/p&gt;  &lt;h3&gt;Existing features&lt;/h3&gt; &lt;ul&gt;&lt;li&gt;Support for flat files with fixed positions.&lt;/li&gt;&lt;li&gt;Support for CSV files.&lt;/li&gt;&lt;li&gt;The schema can be expressed with xml notation or created directly  within the java code.&lt;/li&gt;&lt;li&gt;The parser can either produce a Document class, representing the  content of the file, or you can choose to receive events for each line  that has been successfully parsed.&lt;/li&gt;&lt;li&gt;Can handle huge files without loading everything into memory.&lt;/li&gt;&lt;li&gt;The output Document class contains a list of lines which contains a  list of cells.&lt;/li&gt;&lt;li&gt;The Document class can be transformed into a Java object (via  reflection) if the schema is carefully written.&lt;/li&gt;&lt;li&gt;It is also possible to produce java objects directly from the  parser.&lt;/li&gt;&lt;li&gt;It is possible convert a list of java objects into a file according  to a schema if the schema is carefully written.&lt;/li&gt;&lt;!--&lt;li&gt;The Document class can be transformed into a xml file (according to an internal xml schema).&lt;/li&gt;--&gt;&lt;li&gt;The Document class can be built from a xml file (according to an  internal xml schema).&lt;/li&gt;&lt;li&gt;The input and outputs are given by java.io.Reader and java.io.Writer  which means that it is not necessarily files that are parsed or  generated.&lt;/li&gt;&lt;li&gt;The file parsing schema contains information about how to parse each  cell regarding data type and syntax.&lt;/li&gt;&lt;li&gt;Parsing errors can either be handled by exceptions thrown at first  error or the errors can be collected during parsing to be able to deal  with them later.&lt;/li&gt;&lt;li&gt;JUnit tests for most classes within the library.&lt;/li&gt;&lt;li&gt;Support for localisation.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2&gt;Java Schema Parser&lt;/h2&gt; The javadoc within the package contains more comprehensive documentation  regarding the classes mentioned below.&lt;br /&gt;&lt;br /&gt;The JSaPar package is a java library that provides a parser for flat and  CSV (Comma Separated Values) files.  The concept is that a schema class denotes the way a file should be  parsed or written. The schema class can be built by specifying a  xml-document or it can be constructed programmatically by using java  code. The output of the parser is usually a org.jsapar.Document object that  contains a list of org.jsapar.Line objects which contains a list of  org.jsapar.Cell objects.&lt;br /&gt;&lt;br /&gt;Supported file formats: &lt;ul&gt;&lt;li&gt;&lt;b&gt;Fixed width &lt;/b&gt;&lt;i&gt;- Also refered to as flat file. Each cell is  described only by its positions within the line. The type of the line is  denoted by its position within the file.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Fixed width contol value &lt;/b&gt;&lt;i&gt;- The same as Fixed width above  except that each line type is denoted by a control value in the leading  characters of each line.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;CSV &lt;/b&gt;&lt;i&gt;- (Comma Separated Values) Each cell is limited by a  separator character (or characters). The type of the line is denoted by  its position within the file.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;CSV contol value &lt;/b&gt;&lt;i&gt;- The same as CSV above except that each  line type is denoted by a control value in the leading cell of each  line.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;   &lt;h2&gt;Events for each line&lt;/h2&gt; For very large files there can be a problem to build the complete  org.jsapar.Document in the memory before further processing.  It may simply take up to much memory.  In that case you may choose to get an event for each line that is parsed  instead.  You do that by registering a sub-class of  org.jsapar.ParsingEventListener to the org.jsapar.input.Parser.  That way you can process one line at a time, thus freeing memory as you  go along.    &lt;h2&gt;Converter&lt;/h2&gt; If you are only interesting in converting a file of one format into  another, you can use the org.jsapar.io.Converter where you specify the  input and the output schema for the conversion.  The converter uses the event mechanism under the hood, thus it reads,  converts and writes one line at a time.  This means it is very lean regarding memory usage.  &lt;h2&gt;Building java objects&lt;/h2&gt; Use the method org.jsapar.Parser.buildJava() in order to build java  objects for each line in a file (or input).  Note that in order to be able to use this feature, the schema have to be  carefully written.  For instance, the line type (name) of the line within the schema have to  contain the complete class name of the java class to build for each  line.  &lt;h2&gt;Converting java objects into a file&lt;/h2&gt; Use the class org.jsapar.input.JavaBuilder in order to convert java  objects into a org.jsapar.Document, which can be used to produce the  output file according to a schema. &lt;h2&gt;Using xml as input&lt;/h2&gt; It is possilbe to build a org.jsapar.Document by using a xml document  according to the XMLDocumentFormat.xsl  (http://jsapar.tigris.org/XMLDocumentFormat/1.0).  Use the class org.jsapar.input.XmlDocumentParser in order to convert a  xml document into a org.jsapar.Document.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6529899330738207117?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6529899330738207117/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6529899330738207117' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6529899330738207117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6529899330738207117'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/java-parse-fixed-length-files-2.html' title='java parse fixed-length files (2)'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-5322411416347849580</id><published>2010-05-07T21:37:00.001+02:00</published><updated>2010-05-07T21:38:42.232+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='beped java parse fixed-length files'/><title type='text'>java parse fixed-length files</title><content type='html'>&lt;a href="http://www.theserverside.com/discussions/thread.tss?thread_id=31034#152373"&gt;parsing a text file in java&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;import org.apache.commons.lang.RandomStringUtils;&lt;br /&gt;import  java.io.File;&lt;br /&gt;import java.io.FileOutputStream;&lt;br /&gt;import  java.io.PrintStream;&lt;br /&gt;import java.util.Random;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class  GenerateFile {&lt;br /&gt;&lt;br /&gt;  public static void main(String[] args) throws  Exception {&lt;br /&gt;   File file = new File("hugefile.txt");&lt;br /&gt;    PrintStream ps = new PrintStream(new FileOutputStream(file));&lt;br /&gt;    Random random = new Random(10);&lt;br /&gt;&lt;br /&gt;   StringBuffer sb = new  StringBuffer();&lt;br /&gt;   for(int i=0; i&lt;700000; i++){&lt;br /&gt;  for(int j=0;  j&lt;10; j++){&lt;br /&gt;    sb.append(RandomStringUtils.random(3+random.nextInt(10)%10, true,  true));&lt;br /&gt;   if(j&lt;9){&lt;br /&gt;    sb.append("|");&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;   ps.println(sb.toString());&lt;br /&gt;  sb = new StringBuffer();&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   ps.close();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import  org.apache.commons.lang.StringUtils;&lt;br /&gt;import  org.apache.commons.lang.time.StopWatch;&lt;br /&gt;import java.io.File;&lt;br /&gt;import  java.io.FileReader;&lt;br /&gt;import java.io.BufferedReader;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public  class TokenizeFile {&lt;br /&gt;&lt;br /&gt;  public static void main(String[] args)  throws Exception {&lt;br /&gt;   File file = new File("hugefile.txt");&lt;br /&gt;    BufferedReader br = new BufferedReader(new FileReader(file));&lt;br /&gt;&lt;br /&gt;    StopWatch stopWatch = new StopWatch();&lt;br /&gt;&lt;br /&gt;   stopWatch.start();&lt;br /&gt;&lt;br /&gt;   String line = null;&lt;br /&gt;   long totalLinesProcessed = 0l;&lt;br /&gt;&lt;br /&gt;    while((line=br.readLine())!=null){&lt;br /&gt;    totalLinesProcessed ++;&lt;br /&gt;     StringUtils.split(line, "|");&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   stopWatch.stop();&lt;br /&gt;&lt;br /&gt;   br.close();&lt;br /&gt;&lt;br /&gt;   System.out.println("Total lines processed =  "+totalLinesProcessed+" Time taken = "+stopWatch.getTime() +" ms");&lt;br /&gt;  }&lt;br /&gt;}&lt;/blockquote&gt;If you run the above two files; you would be processing a 55 MB file.&lt;br /&gt;&lt;br /&gt;A  sample run results:&lt;br /&gt;Total lines processed = 700000 Time taken = 4457  ms (1.6 GHZ, 512 MB RAM)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-5322411416347849580?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/5322411416347849580/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=5322411416347849580' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5322411416347849580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5322411416347849580'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/java-parse-fixed-length-files.html' title='java parse fixed-length files'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8149820717374369458</id><published>2010-05-05T23:53:00.001+02:00</published><updated>2010-05-06T00:29:48.552+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='beped xml parsers'/><title type='text'>VTD-XML: The Future of XML Processing</title><content type='html'>&lt;b&gt;&lt;span style=";font-family:Tahoma;font-size:6px;"  &gt;&lt;a href="http://vtd-xml.sourceforge.net/"&gt;VTD-XML:      The Future of XML Processing&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul type="square"&gt;&lt;li&gt;     &lt;p align="justify"&gt;&lt;span style=";font-family:Lucida Sans;font-size:85%;"  &gt;The &lt;b&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;world's most memory-efficient&lt;/span&gt;&lt;/b&gt; (&lt;span style="color: rgb(0, 0, 255);"&gt;1.3x~1.5x&lt;/span&gt;      the size of an XML document) random-access XML parser.  &lt;/span&gt;       &lt;/p&gt;&lt;/li&gt;&lt;li&gt;     &lt;p align="left"&gt;&lt;span style=";font-family:Lucida Sans;font-size:85%;"  &gt;The&lt;a style="text-decoration: none;" href="http://vtd-xml.sf.net/benchmark1.html"&gt;     &lt;b&gt;world's &lt;i&gt;fastest &lt;/i&gt;XML parser&lt;/b&gt;:&lt;/a&gt;      On a &lt;b&gt;Core2&lt;/b&gt; &lt;b&gt;2.5Ghz&lt;/b&gt; Laptop, VTD-XML  outperforms DOM  parsers      by 5x~12x, delivering &lt;i&gt;&lt;b&gt;90~120&lt;/b&gt;&lt;/i&gt;     &lt;b&gt; &lt;i&gt;     MB/sec per core&lt;/i&gt;&lt;/b&gt; sustained      throughput.&lt;/span&gt;       &lt;/p&gt;&lt;/li&gt;&lt;li&gt;     &lt;p align="justify"&gt;&lt;span style=";font-family:Lucida Sans;font-size:85%;"  &gt;The     &lt;a href="http://vtd-xml.sourceforge.net/benchmark3.html" style="text-decoration: none; font-weight: 700;"&gt;     world's &lt;i&gt;fastest&lt;/i&gt;&lt;/a&gt; &lt;b&gt;XPath&lt;/b&gt; 1.0 implementation.&lt;/span&gt;       &lt;/p&gt;&lt;/li&gt;&lt;li&gt;     &lt;p align="justify"&gt;&lt;span style=";font-family:Lucida Sans;font-size:85%;"  &gt;The &lt;b&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;world's most efficient XML indexer&lt;/span&gt;&lt;/b&gt;      that seamlessly integrates with your XML applications.&lt;/span&gt;       &lt;/p&gt;&lt;/li&gt;&lt;li&gt;     &lt;p align="justify"&gt;&lt;span style=";font-family:Lucida Sans;font-size:85%;"  &gt;The&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;b&gt;     world's only incremental-update capable&lt;/b&gt;&lt;/span&gt; XML      parser capable of     &lt;a href="http://www.javaworld.com/javaworld/jw-07-2006/jw-0724-vtdxml.html" style="text-decoration: none;"&gt;     cutting, pasting, splitting and assembling XML &lt;/a&gt;documents with  max      efficiency.&lt;/span&gt;       &lt;/p&gt;&lt;/li&gt;&lt;li&gt;     &lt;p align="justify"&gt;&lt;span style=";font-family:Lucida Sans;font-size:85%;"  &gt;The &lt;b&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;world's only XML parser that allows you to use  XPath      to process 256 GB&lt;/span&gt;&lt;/b&gt; XML documents.&lt;/span&gt;       &lt;/p&gt;&lt;/li&gt;&lt;li&gt;     &lt;p align="justify"&gt;&lt;span style=";font-family:Lucida Sans;font-size:85%;"  &gt;&lt;b&gt;The XML  technology      that they don't want you to know about&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;ver el ejemplo 17:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;/**&lt;br /&gt; * This is a demonstration of how to use the extended VTD parser&lt;br /&gt; * to process &lt;span style="color: rgb(255, 0, 0); font-weight: bold; font-style: italic;"&gt;large XML file&lt;/span&gt;. You need 64-bit JVM to take full&lt;br /&gt; * advantage of extended VTD.&lt;br /&gt; */&lt;br /&gt;import com.ximpleware.extended.*;&lt;br /&gt;public class mem_mapped_read {&lt;br /&gt;    public static void main(String[] s) throws Exception{&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;VTDGenHuge vg = new VTDGenHuge();&lt;/span&gt;&lt;br /&gt;        if (vg.parseFile("test.xml",true,VTDGenHuge.MEM_MAPPED)){&lt;br /&gt;            VTDNavHuge vnh = vg.getNav();&lt;br /&gt;        AutoPilotHuge aph = new AutoPilotHuge(vnh);&lt;br /&gt;        aph.selectXPath("//*");&lt;br /&gt;        int i = 0;&lt;br /&gt;        while ((i=aph.evalXPath())!=-1){&lt;br /&gt;            System.out.println(" element name is "+vnh.toString(i));&lt;br /&gt;        }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8149820717374369458?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8149820717374369458/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8149820717374369458' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8149820717374369458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8149820717374369458'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/vtd-xml-future-of-xml-processing.html' title='VTD-XML: The Future of XML Processing'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-1265540073934293022</id><published>2010-05-05T22:25:00.000+02:00</published><updated>2010-05-05T22:26:25.958+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='beped xml parsers'/><title type='text'>XMLBeans Support for Built-In Schema Types</title><content type='html'>&lt;h1&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html"&gt;XMLBeans Support for Built-In Schema Types&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="30%"&gt;&lt;strong&gt;Built-In Schema Type&lt;/strong&gt;&lt;/td&gt;       &lt;td width="31%"&gt;&lt;strong&gt;XMLBean Type&lt;/strong&gt;&lt;/td&gt;       &lt;td width="39%"&gt;&lt;strong&gt;Natural Java Type&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;xs:anyType&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlObject.html"&gt;XmlObject&lt;/a&gt;&lt;/td&gt;       &lt;td&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlObject.html"&gt;org.apache.xmlbeans.XmlObject&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#dt-anySimpleType" target="_blank"&gt;xs:anySimpleType&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlAnySimpleType.html"&gt;XmlAnySimpleType&lt;/a&gt;&lt;/td&gt;       &lt;td&gt; &lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#anyURI" target="_blank"&gt;xs:anyURI&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlAnyURI.html"&gt;XmlAnyURI&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#base64Binary" target="_blank"&gt;xs:base64Binary&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlBase64Binary.html"&gt;XmlBase64Binary&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;byte[]&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#boolean" target="_blank"&gt;xs:boolean&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlBoolean.html"&gt;XmlBoolean&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;boolean&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#byte" target="_blank"&gt;xs:byte&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlByte.html"&gt;XmlByte&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;byte&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td height="17"&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#date" target="_blank"&gt;xs:date&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlDate.html"&gt;XmlDate&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html" target="_blank"&gt;java.util.Calendar&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#dateTime" target="_blank"&gt;xs:dateTime&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlDateTime.html"&gt;XmlDateTime&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html" target="_blank"&gt;java.util.Calendar&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#decimal" target="_blank"&gt;xs:decimal&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlDecimal.html"&gt;XmlDecimal&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html" target="_blank"&gt;java.math.BigDecimal&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#double" target="_blank"&gt;xs:double&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlDouble.html"&gt;XmlDouble&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;double&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#duration" target="_blank"&gt;xs:duration&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlDuration.html"&gt;XmlDuration&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/GDuration.html"&gt;org.apache.xmlbeans.GDuration&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#ENTITIES" target="_blank"&gt;xs:ENTITIES&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlENTITIES.html"&gt;XmlENTITIES&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#ENTITY" target="_blank"&gt;xs:ENTITY&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlENTITY.html"&gt;XmlENTITY&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#float" target="_blank"&gt;xs:float&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlFloat.html"&gt;XmlFloat&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;float&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#gDay" target="_blank"&gt;xs:gDay&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;p&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlGDay.html"&gt;XmlGDay&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html" target="_blank"&gt;java.util.Calendar&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#gMonth" target="_blank"&gt;xs:gMonth&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlGMonth.html"&gt;XmlGMonth&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html" target="_blank"&gt;java.util.Calendar&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#gMonthDay" target="_blank"&gt;xs:gMonthDay&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlGMonthDay.html"&gt;XmlGMonthDay&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html" target="_blank"&gt;java.util.Calendar&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#gYear" target="_blank"&gt;xs:gYear&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlGYear.html"&gt;XmlGYear&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html" target="_blank"&gt;java.util.Calendar&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#gYearMonth" target="_blank"&gt;xs:gYearMonth&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlGYearMonth.html"&gt;XmlGYearMonth&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html" target="_blank"&gt;java.util.Calendar&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#hexBinary" target="_blank"&gt;xs:hexBinary&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlHexBinary.html"&gt;XmlHexBinary&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;byte[]&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#ID" target="_blank"&gt;xs:ID&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlID.html"&gt;XmlID&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#IDREF" target="_blank"&gt;xs:IDREF&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlIDREF.html"&gt;XmlIDREF&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#IDREFS" target="_blank"&gt;xs:IDREFS&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlIDREFS.html"&gt;XmlIDREFS&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#int" target="_blank"&gt;xs:int&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlInt.html"&gt;XmlInt&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;int&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#integer" target="_blank"&gt;xs:integer&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlInteger.html"&gt;XmlInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" target="_blank"&gt;java.math.BigInteger&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#language" target="_blank"&gt;xs:language&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlLanguage.html"&gt;XmlLanguage&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#long" target="_blank"&gt;xs:long&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlLong.html"&gt;XmlLong&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;long&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#Name" target="_blank"&gt;xs:Name&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlName.html"&gt;XmlName&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#NCName" target="_blank"&gt;xs:NCName&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlNCName.html"&gt;XmlNCNAME&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#negativeInteger" target="_blank"&gt;xs:negativeInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlNegativeInteger.html"&gt;XmlNegativeInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" target="_blank"&gt;java.math.BigInteger&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#NMTOKEN" target="_blank"&gt;xs:NMTOKEN&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlNMTOKEN.html"&gt;XmlNMTOKEN&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#NMTOKENS" target="_blank"&gt;xs:NMTOKENS&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlNMTOKENS.html"&gt;XmlNMTOKENS&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger" target="_blank"&gt;xs:nonNegativeInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlNonNegativeInteger.html"&gt;XmlNonNegativeInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" target="_blank"&gt;java.math.BigInteger&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger" target="_blank"&gt;xs:nonPositiveInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlNonPositiveInteger.html"&gt;XmlNonPositiveInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" target="_blank"&gt;java.math.BigInteger&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#normalizedString" target="_blank"&gt;xs:normalizedString&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlNormalizedString.html"&gt;XmlNormalizedString&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#NOTATION" target="_blank"&gt;xs:NOTATION&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlNOTATION.html"&gt;XmlNOTATION&lt;/a&gt;&lt;/td&gt;       &lt;td&gt; Not supported&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#positiveInteger" target="_blank"&gt;xs:positiveInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlPositiveInteger.html"&gt;XmlPositiveInteger&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" target="_blank"&gt;java.math.BigInteger&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#QName" target="_blank"&gt;xs:QName&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlQName.html"&gt;XmlQName&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2ee/1.4/docs/api/javax/xml/namespace/QName.html" target="_blank"&gt;javax.xml.namespace.QName&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#short" target="_blank"&gt;xs:short&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlShort.html"&gt;XmlShort&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;short&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#string" target="_blank"&gt;xs:string&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlString.html"&gt;XmlString&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#time" target="_blank"&gt;xs:time&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlTime.html"&gt;XmlTime&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html" target="_blank"&gt;java.util.Calendar&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#token" target="_blank"&gt;xs:token&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlToken.html"&gt;XmlToken&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html" target="_blank"&gt;String&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#unsignedByte" target="_blank"&gt;xs:unsignedByte&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlUnsignedByte.html"&gt;XmlUnsignedByte&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;short&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#unsignedInt" target="_blank"&gt;xs:unsignedInt&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlUnsignedInt.html"&gt;XmlUnsignedInt&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;long&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#unsignedLong" target="_blank"&gt;xs:unsignedLong&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlUnsignedLong.html"&gt;XmlUnsignedLong&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" target="_blank"&gt;java.math.BigInteger&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://www.w3.org/TR/xmlschema-2/#unsignedShort" target="_blank"&gt;xs:unsignedShort&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlUnsignedShort.html"&gt;XmlUnsignedShort&lt;/a&gt;&lt;/td&gt;       &lt;td&gt;int&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-1265540073934293022?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/1265540073934293022/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=1265540073934293022' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1265540073934293022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1265540073934293022'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/xmlbeans-support-for-built-in-schema.html' title='XMLBeans Support for Built-In Schema Types'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6945410097154726252</id><published>2010-05-05T22:24:00.000+02:00</published><updated>2010-05-05T22:25:27.867+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='beped xml parsers'/><title type='text'>XMLBeans Tools</title><content type='html'>&lt;h1&gt;&lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html"&gt;XMLBeans Tools&lt;/a&gt; &lt;/h1&gt;&lt;br /&gt;&lt;p&gt; XMLBeans includes several command-line tools you might find handy as  shortcuts    for common tasks. You'll find these tools in the bin directory of the  XMLBeans    installation or source tree.&lt;/p&gt; &lt;dl&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#dumpxsb"&gt;dumpxsb  (XSB File Dumper)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Prints the contents of an XSB file in human-readable form. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#inst2xsd"&gt;inst2xsd  (Instance to Schema Tool)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Generates XML schema from XML instance files. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#scomp"&gt;scomp  (Schema Compiler)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Compiles a schema into XMLBeans classes and metadata. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#scopy"&gt;scopy  (Schema Copier)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Copies the XML schema at the specified URL to the specified file.  &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#sdownload"&gt;sdownload  (Schema Downloader)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Maintains "xsdownload.xml," an index of locally downloaded XSD      files. URLs that are specified are downloaded if they aren't already  cached.      If no files or URLs are specified, all indexed files are relevant. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#sfactor"&gt;sfactor  (Schema Factoring Tool)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Factors redundant definitions out of a set of schemas and uses  imports      instead. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#svalidate"&gt;svalidate  (Streaming Instance Validator)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Validates a schema definition and instances within the schema. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#validate"&gt;validate  (Instance Validator)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Validates an instance against a schema. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#xpretty"&gt;xpretty  (XML Pretty Printer)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Pretty prints the specified XML to the console. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#xsd2inst"&gt;xsd2inst  (Schema to Instance Tool)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Prints an XML instance from the specified global element using  the specified      schema. &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#xsdtree"&gt;xsdtree  (Schema Type Hierarchy Printer)&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Prints an inheritance hierarchy of the types defined in a schema.  &lt;/dd&gt;&lt;dt&gt;  &lt;/dt&gt;&lt;dt&gt; &lt;a href="http://xmlbeans.apache.org/docs/2.0.0/guide/antXmlbean.html"&gt;xmlbean  Ant task&lt;/a&gt; &lt;/dt&gt;&lt;dd&gt; Compiles a set of XSD and/or WSDL files into XMLBeans types. &lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6945410097154726252?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6945410097154726252/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6945410097154726252' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6945410097154726252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6945410097154726252'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/xmlbeans-tools.html' title='XMLBeans Tools'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-516985126149173892</id><published>2010-05-05T20:26:00.003+02:00</published><updated>2010-05-05T21:00:33.784+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='beped xml parsers'/><title type='text'>Open Source XML Parsers in Java</title><content type='html'>&lt;h1&gt;&lt;a href="http://java-source.net/open-source/xml-parsers"&gt;Open Source XML Parsers in Java&lt;/a&gt;&lt;/h1&gt;Para la aplicación beped debemos encontrar el parser que mejor se adapte a nuestras necesidades.&lt;br /&gt;Los que más parecen ajustarse son:&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span&gt;&lt;a href="http://java-source.net/open-source/xml-parsers/xmlbeans"&gt;XMLBeans&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;At a high level XMLBeans is an &lt;span style="font-weight: bold;"&gt;XML-Java binding tool&lt;/span&gt; that uses XML  Schema as a basis for generating Java classes that you can use to easily  access XML instance data in a natural manner in your Java programs. It  was designed to provide both easy access to XML information via  convenient Java classes as well as complete access to the underlying  XML, combining the best of low-level APIs like SAX and DOM that provide  full access with the convenience of Java binding.  There are several factors that set XMLBeans apart from any other  XML-Java binding alternatives:     &lt;br /&gt;&lt;br /&gt; * XML Schema Compliance - XMLBeans has achieved extremely  high schema compliance and is able to compile even the most complex  schemas. This is critical when adopting an XML-Java binding framework  since you may received schemas that are out of your control.     &lt;br /&gt; * Access to the full underlying XML Infoset - The XML Cursor  API allows you to access a lower level DOM like access to the underying  XML Infoset. &lt;span style="color: rgb(255, 0, 0); font-style: italic; font-weight: bold;"&gt;You can get a "cursor" at any point while using the  strongly typed generated XMLBeans and begin navigating the underlying  XML instance&lt;/span&gt;.      &lt;br /&gt; * Access to the schema type system - The XMLBeans schema API  allows you to walk through the schema type system giving you full access  to a Java object representation of the XML Schema that was compiled to  generate the XMLBeans classes.     &lt;br /&gt; * Speed - XMLBeans is optimized for performance at many levels.  For example, XMLBeans lazily constructs objects from XML, so that you  do not have the performance overhead of object creation when you only  access portions of an XML document. Several Fortune 500 customers have  adopted XMLBeans based on speed alone.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span&gt;&lt;a href="http://java-source.net/open-source/xml-parsers/jaxb"&gt;JAXB&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;The Java Architecture for XML Binding (JAXB) provides a fast and  convenient way to &lt;span style="font-weight: bold;"&gt;bind between XML schemas and Java representations&lt;/span&gt;,  making it easy for Java developers to incorporate XML data and  processing functions in Java applications&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span&gt;&lt;a href="http://java-source.net/open-source/xml-parsers/jibx-binding-xml-to-java-code"&gt;JiBX:  Binding XML to Java Code&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;JiBX is a framework for &lt;span style="font-weight: bold;"&gt;binding XML data to Java objects&lt;/span&gt;. It lets you  work with data from XML documents using your own class structures. The  JiBX framework handles all the details of converting your data to and  from XML based on your instructions. JiBX is designed to perform the  translation between internal data structures and XML with very high  efficiency, but still allows you a high degree of control over the  translation process.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span&gt;&lt;a href="http://java-source.net/open-source/xml-parsers/vtd-xml-1.5"&gt;VTD-XML  1.5 (xcuriosidad)&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;VTD-XML is the next generation XML parser that goes beyond DOM and SAX  in terms of performance, memory and ease of use.   To XML developers, VTD-XML is simple and just works!    Other innovative features include XML indexing (due to inherent  persistence of VTD) and incremental update.      It is also the world's fastest XML processor: On an Athlon64 3400+ PC,  VTD-XML significantly (1.5x~2x) outperforms  SAX parsers with NULL  content handler, delivering 50~60 MB/sec sustained throughput, without  sacrificing random access. Its memory usage is typically between  1.3x~1.5x the size of the XML document, with 1 being the XML itself.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span&gt;&lt;a href="http://java-source.net/open-source/xml-parsers/zeus"&gt;Zeus&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;Zeus is, in a nutshell, an open source &lt;span style="font-weight: bold;"&gt;Java-to-XML Data Binding tool&lt;/span&gt;. It  provides a means of taking an arbitrary XML document and converting  that document into a Java object representing the XML. That Java object  can then be used and manipulated like any other Java object in the VM  (virtual machine). Then, once the object has been modified and operated  upon, Zeus can be used to convert the Java object back into an XML  representation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-516985126149173892?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/516985126149173892/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=516985126149173892' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/516985126149173892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/516985126149173892'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/open-source-xml-parsers-in-java.html' title='Open Source XML Parsers in Java'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7763217145277861795</id><published>2010-05-02T21:50:00.001+02:00</published><updated>2010-05-02T21:51:52.172+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hermes ldap taylor'/><title type='text'>HERMES: Taylor identity para LDAP</title><content type='html'>&lt;a href="http://taylor.sourceforge.net/index.php/Taylor_Identity"&gt;Ldap&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Using a database identity store is great for development and small  applications. However, for enterprise applications you will want to use  Ldap. &lt;/p&gt;&lt;p&gt;The following shows how to configure the Taylor Identity Ldap  implementation. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7763217145277861795?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7763217145277861795/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7763217145277861795' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7763217145277861795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7763217145277861795'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/05/hermes-taylor-identity-para-ldap.html' title='HERMES: Taylor identity para LDAP'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-4072142448611524414</id><published>2010-04-26T01:24:00.001+02:00</published><updated>2010-04-26T01:26:34.284+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='test testng maven'/><title type='text'>ant tasks in maven</title><content type='html'>Para correr los test del build.xml desde maven:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sfwk.org/Community/TestNGMavenHowToConfigureItCorrectly#comment73470" onclick="selectCommentBox('#comment73470')"&gt;TestNG &amp;amp; Maven: How to  configure it correctly&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;maven-antrun-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;executions&amp;gt;&lt;br /&gt;        &amp;lt;execution&amp;gt;&lt;br /&gt;            &amp;lt;id&amp;gt;pre-test&amp;lt;/id&amp;gt;&lt;br /&gt;            &amp;lt;phase&amp;gt;process-test-resources&amp;lt;/phase&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;                &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;&lt;br /&gt;            &amp;lt;/goals&amp;gt;&lt;br /&gt;            &amp;lt;configuration&amp;gt;&lt;br /&gt;                &amp;lt;tasks&amp;gt;&lt;br /&gt;                    &amp;lt;move todir="${project.build.outputDirectory}"&amp;gt;&lt;br /&gt;                        &amp;lt;fileset dir="${project.build.outputDirectory}"&amp;gt;&lt;br /&gt;                            &amp;lt;!-- include list of files you want to have hidden during tests --&amp;gt;&lt;br /&gt;                            &amp;lt;include name="META-INF/persistence.xml"/&amp;gt;&lt;br /&gt;                        &amp;lt;/fileset&amp;gt;&lt;br /&gt;                        &amp;lt;mapper type="glob" from="*" to="*~"/&amp;gt;&lt;br /&gt;                    &amp;lt;/move&amp;gt;&lt;br /&gt;                &amp;lt;/tasks&amp;gt;&lt;br /&gt;            &amp;lt;/configuration&amp;gt;&lt;br /&gt;        &amp;lt;/execution&amp;gt;&lt;br /&gt;        &amp;lt;execution&amp;gt;&lt;br /&gt;            &amp;lt;id&amp;gt;post-test&amp;lt;/id&amp;gt;&lt;br /&gt;            &amp;lt;phase&amp;gt;test&amp;lt;/phase&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;                &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;&lt;br /&gt;            &amp;lt;/goals&amp;gt;&lt;br /&gt;            &amp;lt;configuration&amp;gt;&lt;br /&gt;                &amp;lt;tasks&amp;gt;&lt;br /&gt;                    &amp;lt;move todir="${project.build.outputDirectory}"&amp;gt;&lt;br /&gt;                        &amp;lt;fileset dir="${project.build.outputDirectory}" defaultexcludes="false"&amp;gt;&lt;br /&gt;                            &amp;lt;include name="**/*~"/&amp;gt;&lt;br /&gt;                        &amp;lt;/fileset&amp;gt;&lt;br /&gt;                        &amp;lt;mapper type="glob" from="*~" to="*"/&amp;gt;&lt;br /&gt;                    &amp;lt;/move&amp;gt;&lt;br /&gt;                &amp;lt;/tasks&amp;gt;&lt;br /&gt;            &amp;lt;/configuration&amp;gt;&lt;br /&gt;        &amp;lt;/execution&amp;gt;&lt;br /&gt;    &amp;lt;/executions&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-4072142448611524414?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/4072142448611524414/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=4072142448611524414' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4072142448611524414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4072142448611524414'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/04/ant-tasks-in-maven.html' title='ant tasks in maven'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-438646903204147576</id><published>2010-04-26T01:05:00.001+02:00</published><updated>2010-04-26T01:24:54.148+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='test testng maven'/><title type='text'>SeamTest and Maven</title><content type='html'>&lt;h2 class="wikiHeadline2" id="H-SeamTestAndMaven"&gt;&lt;a href="http://seamframework.org/Documentation/IsThereAMaven2ProjectTemplateForSeamApplications#H-SeamTestAndMaven"&gt;SeamTest  and Maven&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p class="wikiPara"&gt; Using SeamTest with Maven can be a challenge because the Embedded JBoss  container on which SeamTest relies is not very &lt;q&gt;classpath&lt;/q&gt;  friendly. It brings its own solar system of JAR files with it and those  can easily conflict with the classpath built by Maven. Please see the  following thread on how best to integrate the two: &lt;/p&gt;  &lt;p class="wikiPara"&gt; &lt;a href="http://sfwk.org/Community/TestNGMavenHowToConfigureItCorrectly" target="" class="regularLink"&gt;TestNG and Maven - How To Configure It  Correctly&lt;/a&gt; &lt;/p&gt;  &lt;p class="wikiPara"&gt; Play close attention to the responses Dan gives. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-438646903204147576?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/438646903204147576/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=438646903204147576' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/438646903204147576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/438646903204147576'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/04/seamtest-and-maven.html' title='SeamTest and Maven'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8820873094144327745</id><published>2010-04-26T00:46:00.001+02:00</published><updated>2010-04-26T00:56:32.697+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arquilian hermes testng'/><title type='text'>para probar Arquilian en hermes</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(204, 102, 0); font-family: verdana;font-size:180%;" &gt;&lt;a href="http://docs.jboss.org/arquillian/reference/1.0.0.Alpha1/en-US/html_single/#gettingstarted"&gt;Getting started&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="toc"&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://docs.jboss.org/arquillian/reference/1.0.0.Alpha1/en-US/html_single/#d0e395"&gt;3.1.  Setting up Arquillian in a Maven project&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://docs.jboss.org/arquillian/reference/1.0.0.Alpha1/en-US/html_single/#d0e429"&gt;3.2.  Writing your first Arquillian test&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://docs.jboss.org/arquillian/reference/1.0.0.Alpha1/en-US/html_single/#d0e508"&gt;3.3.  Setting up and running the test in Maven&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://docs.jboss.org/arquillian/reference/1.0.0.Alpha1/en-US/html_single/#d0e552"&gt;3.4.  Setting up and running the test in Eclipse&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://docs.jboss.org/arquillian/reference/1.0.0.Alpha1/en-US/html_single/#d0e599"&gt;3.5.  Setting up and running the test in NetBeans&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/div&gt;&lt;p&gt;       We've promised you that integration testing with Arquillian is no  more complicated than writing a unit test. Now       it's time to prove it to you.  In this chapter, we'll look at what  is required to setup Arquillian in your       project, how to write an Arquillian test case, how to execute the  test case and how the test results are       displayed. That sounds like a lot, but you'll be writing your own  Arquillian tests in no time. (You'll also learn       about &lt;a class="xref" href="http://docs.jboss.org/arquillian/reference/1.0.0.Alpha1/en-US/html_single/#debugging" title="Chapter 7. Debugging remote tests"&gt;Chapter 7, &lt;i&gt;Debugging  remote tests&lt;/i&gt;&lt;/a&gt; in Chapter 7).    &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8820873094144327745?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8820873094144327745/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8820873094144327745' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8820873094144327745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8820873094144327745'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/04/para-probar-arquilian-en-hermes.html' title='para probar Arquilian en hermes'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7124781847926934299</id><published>2010-04-26T00:16:00.002+02:00</published><updated>2010-04-26T00:26:12.929+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='testng'/><title type='text'>TestNG</title><content type='html'>&lt;span style="font-family: times new roman;font-size:180%;" &gt;&lt;a href="http://testng.org/doc/documentation-main.html#annotations"&gt;reference-guide&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;@BeforeSuite: &lt;/b&gt;The annotated method will be run before all tests  in this suite have run. &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@AfterSuite: &lt;/b&gt; The annotated method will be run after all  tests in this suite have run.  &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@BeforeTest&lt;/b&gt;: The annotated method will be run before any test  method belonging to the classes inside the &lt;test&gt; tag is run. &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@AfterTest&lt;/b&gt;: The annotated method will be run after all the  test methods belonging to the classes inside the &lt;test&gt; tag have  run. &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@BeforeGroups&lt;/b&gt;:   The list of groups that this configuration  method will run before. This method is guaranteed to run shortly before  the first test method that belongs to any of these groups is invoked. &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@AfterGroups&lt;/b&gt;:   The list of groups that this configuration  method will run after.  This method is guaranteed to run shortly after  the last test method that belongs to any of these groups is invoked. &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@BeforeClass&lt;/b&gt;: The annotated method will be run before the  first test method in the current class is invoked. &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@AfterClass&lt;/b&gt;: The annotated method will be run after all the  test methods in the current class have been run.  &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@BeforeMethod&lt;/b&gt;: The annotated method will be run before each  test method. &lt;br /&gt;&lt;b&gt;&lt;br /&gt;@AfterMethod&lt;/b&gt;: The annotated method will be run after each  test method.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;font-size:130%;" &gt;@Parameters&lt;/span&gt;&lt;b&gt;&lt;tt&gt;&lt;br /&gt;&lt;/tt&gt;&lt;/b&gt;&lt;b&gt;Describes how to pass parameters to a @Test method.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;@Test&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;tt style="font-weight: bold; color: rgb(51, 51, 255);"&gt;dependsOnGroups&lt;/tt&gt;&lt;br /&gt;The list of groups this method depends on.&lt;br /&gt;&lt;tt style="color: rgb(51, 51, 255); font-weight: bold;"&gt;dependsOnMethods&lt;/tt&gt;&lt;br /&gt;The list of methods this method depends on.&lt;br /&gt;&lt;tt&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;expectedExceptions&lt;/span&gt;&lt;br /&gt;&lt;/tt&gt;The list of exceptions that a test method is expected to throw.  If no  exception or a different than one on this list is thrown, this test will  be marked a failure.&lt;br /&gt;&lt;tt style="color: rgb(51, 51, 255); font-weight: bold;"&gt;sequential&lt;/tt&gt;&lt;br /&gt;If set to true, all the methods on this test class are guaranteed to run  sequentially, even if the tests are currently being run with  parallel="methods". This attribute can only be used at the class level  and it will be ignored if used at the method level.  &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;&lt;a href="http://testng.org/doc/documentation-main.html#running-testng-programmatically" name="running-testng-programmatically"&gt;5.13 - Running TestNG  programmatically&lt;/a&gt;&lt;/h4&gt;&lt;h4&gt;&lt;a name="running-testng-programmatically"&gt;&lt;/a&gt;&lt;/h4&gt;You can invoke TestNG from your own programs very easily:&lt;br /&gt;&lt;blockquote style="color: rgb(153, 0, 0); font-family: courier new;"&gt;&lt;code class="java plain"&gt;TestListenerAdapter tla = &lt;/code&gt;&lt;code class="java  keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;TestListenerAdapter();&lt;/code&gt;&lt;div class="line alt2"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="content"&gt;&lt;code class="java plain"&gt;TestNG testng = &lt;/code&gt;&lt;code class="java keyword"&gt;new&lt;/code&gt;  &lt;code class="java plain"&gt;TestNG();&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="line alt1"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="content"&gt;&lt;code class="java plain"&gt;testng.setTestClasses(&lt;/code&gt;&lt;code class="java  keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;Class[] { Run2.&lt;/code&gt;&lt;code class="java keyword"&gt;class&lt;/code&gt; &lt;code class="java plain"&gt;});&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="line alt2"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="content"&gt;&lt;code class="java plain"&gt;testng.addListener(tla);&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;code class="java plain"&gt;testng.run(); &lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7124781847926934299?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7124781847926934299/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7124781847926934299' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7124781847926934299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7124781847926934299'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/04/testng.html' title='TestNG'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-4524706584079910947</id><published>2010-04-25T23:52:00.001+02:00</published><updated>2010-04-25T23:54:09.301+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='test arquilian testng maven'/><title type='text'>Arquilian</title><content type='html'>&lt;span style="color: rgb(51, 51, 255);font-size:180%;" &gt;&lt;a href="http://community.jboss.org/docs/DOC-14376?uniqueTitle=false"&gt;Test-in container&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Arquillian provides a easy mechanism to test your application code  inside a remote or embedded container or by interacting as a client of  the container.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0); font-family: verdana; font-style: italic;"&gt;To avoid introducing unnecessary complexity into the developer's build  environment, Arquillian integrates transparently with familiar testing  frameworks (e.g., JUnit 4, &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 51, 0); font-family: verdana; font-style: italic;"&gt;TestNG 5&lt;/span&gt;&lt;span style="color: rgb(153, 51, 0); font-family: verdana; font-style: italic;"&gt;), allowing tests to be launched  using existing IDE, Ant and &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 51, 0); font-family: verdana; font-style: italic;"&gt;Maven&lt;/span&gt;&lt;span style="color: rgb(153, 51, 0); font-family: verdana; font-style: italic;"&gt; test plugins without any add-ons.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-4524706584079910947?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/4524706584079910947/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=4524706584079910947' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4524706584079910947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4524706584079910947'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/04/arquilian.html' title='Arquilian'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8729521219271741782</id><published>2010-04-19T21:47:00.000+02:00</published><updated>2010-04-19T21:48:48.348+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hermes unique validator'/><title type='text'>Para lo de unique numeroOrden-turno</title><content type='html'>crear un &lt;a href="http://czamorano-notes.blogspot.com/2009/04/extending-hibernate-validation.html"&gt;Custom Assertion Validator&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8729521219271741782?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8729521219271741782/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8729521219271741782' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8729521219271741782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8729521219271741782'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/04/para-lo-de-unique-numeroorden-turno.html' title='Para lo de unique numeroOrden-turno'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3545675294831396921</id><published>2010-04-01T00:28:00.001+02:00</published><updated>2010-04-01T00:56:21.409+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate validation groups object references'/><title type='text'>hermes: validating properties referencing another object</title><content type='html'>&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://docs.jboss.org/hibernate/validator/4.1/reference/en-US/html_single/#validator-gettingstarted" id="d0e412"&gt;2.1.5. Object  graphs&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;a id="d0e412"&gt;The Bean Validation  API does not only allow to validate single       class instances but also complete object graphs. To do so, just  annotate       a field or property representing a reference to another object  with       &lt;code class="classname"&gt;@Valid&lt;/code&gt;. If the parent object is  validated, all       referenced objects annotated with &lt;code class="classname"&gt;@Valid&lt;/code&gt;  will be       validated as well (as will be their children etc.)&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://docs.jboss.org/hibernate/validator/4.1/reference/en-US/html_single/#validator-usingvalidator-validationgroups" id="validator-usingvalidator-validationgroups"&gt;2.3. Validating groups&lt;/a&gt;&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;a id="validator-usingvalidator-validationgroups"&gt;Groups allow you to  restrict the set of constraints applied during     validation. This makes for example wizard like validation possible  where     in each step only a specified subset of constraints get validated.  The     groups targeted are passed as var-args parameters to     &lt;code class="methodname"&gt;validate&lt;/code&gt;,     &lt;code class="methodname"&gt;validateProperty&lt;/code&gt; and     &lt;code class="methodname"&gt;validateValue&lt;/code&gt;. Let's have a look at  an extended     &lt;code class="classname"&gt;Car&lt;/code&gt; with &lt;code class="classname"&gt;Driver&lt;/code&gt;  example.     First we have the class &lt;code class="classname"&gt;Person&lt;/code&gt; (&lt;/a&gt;&lt;a class="xref" href="http://docs.jboss.org/hibernate/validator/4.1/reference/en-US/html_single/#example-person" title="Example 2.12. Person"&gt;Example 2.12, “Person”&lt;/a&gt;) which has a &lt;code class="classname"&gt;@NotNull     &lt;/code&gt;constraint on &lt;span class="property"&gt;name&lt;/span&gt;. Since no  group is     specified for this annotation its default group is     &lt;code class="classname"&gt;javax.validation.groups.Default&lt;/code&gt;.&lt;/p&gt;&lt;a id="d0e412"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3545675294831396921?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3545675294831396921/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3545675294831396921' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3545675294831396921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3545675294831396921'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/04/hermes-validating-properties.html' title='hermes: validating properties referencing another object'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6823221423640500222</id><published>2010-03-31T23:55:00.000+02:00</published><updated>2010-03-31T23:56:41.756+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate procesos batch'/><title type='text'>hibernate: procesos batch</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(0, 153, 0);font-size:130%;" &gt;&lt;a href="http://federicovarela.blogspot.com/2007/12/cache-en-hibernate.html"&gt;Procesos batch&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;si por alguna razón queremos deshabilitar o evitar el uso del cache,  podemos usar un tipo especial de session: &lt;a href="http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#batch-statelesssession" target="_blank"&gt;&lt;span&gt;StatelessSession&lt;/span&gt;&lt;/a&gt;, se obtiene de la  sessionFactory con el método openStatelessSession(). Yo la uso en el  caso de los &lt;span style="font-weight: bold;"&gt;procesos batch&lt;/span&gt;, por  ejemplo cuando tengo que hacer inserts o updates masivos, así evito que  cada vez que hago el save de un objeto, el mismo me quede en memoria y  en el correr del proceso se produzca un error del tipo &lt;span style="font-weight: bold;"&gt;OutOfMemoryError&lt;/span&gt;. La &lt;span style="font-weight: bold;"&gt;StatelessSession&lt;/span&gt; no interactúa con el  First Level Cache ni con el Second Level Cache, es casi como si  utilizáramos JDBC directamente.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6823221423640500222?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6823221423640500222/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6823221423640500222' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6823221423640500222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6823221423640500222'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/03/hibernate-procesos-batch.html' title='hibernate: procesos batch'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3038877917913218428</id><published>2010-03-29T23:20:00.002+02:00</published><updated>2010-03-29T23:23:40.583+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate preupdate prepersist'/><title type='text'>@PreUpdate @PrePersist</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(0, 0, 153); font-family: arial; font-weight: bold;"&gt;prueba de @PreUpdate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;no pasa por el preUpdate de booking ni con los Home ni con el entityManager&lt;br /&gt;&lt;br /&gt;código de la prueba (action1.java)&lt;br /&gt;&lt;blockquote&gt;package org.domain.test11.session;&lt;br /&gt;&lt;br /&gt;import javax.persistence.EntityManager;&lt;br /&gt;&lt;br /&gt;import org.domain.test11.entity.Booking;&lt;br /&gt;import org.domain.test11.entity.Hotel;&lt;br /&gt;import org.jboss.seam.annotations.In;&lt;br /&gt;import org.jboss.seam.annotations.Logger;&lt;br /&gt;import org.jboss.seam.annotations.Name;&lt;br /&gt;import org.jboss.seam.international.StatusMessages;&lt;br /&gt;import org.jboss.seam.log.Log;&lt;br /&gt;&lt;br /&gt;@Name("action1")&lt;br /&gt;public class Action1&lt;br /&gt;{&lt;br /&gt;    @Logger private Log log;&lt;br /&gt;&lt;br /&gt;    @In StatusMessages statusMessages;&lt;br /&gt;&lt;br /&gt;    @In(create=true) BookingHome bookingHome;&lt;br /&gt;    @In(create=true) HotelHome hotelHome;&lt;br /&gt;    public void action1()&lt;br /&gt;    {&lt;br /&gt;        // implement your business logic here&lt;br /&gt;        log.info("action1.action1() action called");&lt;br /&gt;        statusMessages.add("action1");&lt;br /&gt;       &lt;br /&gt;        update3();&lt;br /&gt;       &lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;    @In EntityManager entityManager;&lt;br /&gt;    public void update2() {&lt;br /&gt;        Booking b = (Booking)entityManager.find(Booking.class, new Long(1));&lt;br /&gt;        b.getCustomer().setName("pepero");&lt;br /&gt;        entityManager.persist(b);&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;    public void update3() {&lt;br /&gt;        Hotel hotel = hotelHome.getEntityManager().find(Hotel.class, new Long(1));&lt;br /&gt;        Booking booking = bookingHome.getEntityManager().find(Booking.class, new Long(1));&lt;br /&gt;        booking.getHotel().setCity("madrid3");&lt;br /&gt;        booking.getCustomer().setName("manolo6");&lt;br /&gt;        bookingHome.setInstance(booking);&lt;br /&gt;        bookingHome.update();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // add additional action methods&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3038877917913218428?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3038877917913218428/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3038877917913218428' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3038877917913218428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3038877917913218428'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/03/preupdate-prepersist.html' title='@PreUpdate @PrePersist'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6369724969284429389</id><published>2010-03-24T23:12:00.003+01:00</published><updated>2010-03-24T23:17:04.333+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='log4j procesos hermes'/><title type='text'>para los logs de los procesos</title><content type='html'>en este código se puede ver cómo añadir un appender al logger de la clase. La clase llamará a un método en un servicio pasándole el logger, y este servicio añadirá al logger el appender.&lt;br /&gt;También podemos pasar del log de seam y configurar el logger de la forma clásica en log4j (como en el ejemplo siguiente).&lt;br /&gt;&lt;blockquote&gt;package es.imserso.sample.log;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.util.Enumeration;&lt;br /&gt;&lt;br /&gt;import org.apache.log4j.Appender;&lt;br /&gt;import org.apache.log4j.FileAppender;&lt;br /&gt;import org.apache.log4j.Logger;&lt;br /&gt;import org.apache.log4j.PropertyConfigurator;&lt;br /&gt;import org.apache.log4j.SimpleLayout;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class Inicio {&lt;br /&gt;   &lt;br /&gt;    static Logger logger = Logger.getLogger(Inicio.class);&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * @param args&lt;br /&gt;     */&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        PropertyConfigurator.configure("log4j.properties");&lt;br /&gt;       &lt;br /&gt;        logger.info("comienzo de la aplicación");&lt;br /&gt;       &lt;br /&gt;        Inicio i = new Inicio();&lt;br /&gt;        i.ejecuta();&lt;br /&gt;       &lt;br /&gt;        logger.info("fin de la aplicación");&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    private void ejecuta() {&lt;br /&gt;       &lt;br /&gt;        try {&lt;br /&gt;            Appender appender = null;&lt;br /&gt;            logger.addAppender(new FileAppender(new SimpleLayout(), "proceso2.log"));&lt;br /&gt;            logger.info("iniciando proceso...");&lt;br /&gt;            logger.info("este fichero tiene que ser proceso2.log");&lt;br /&gt;           &lt;br /&gt;            Enumeration&lt;fileappender&gt; e = logger.getAllAppenders();&lt;br /&gt;           &lt;br /&gt;            while (e.hasMoreElements()) {&lt;br /&gt;                appender = e.nextElement();&lt;br /&gt;                appender.setName("myappender");&lt;br /&gt;            }&lt;br /&gt;           &lt;br /&gt;            logger.info("finalizando proceso...");&lt;br /&gt;            logger.removeAppender(appender);&lt;br /&gt;        } catch (IOException e) {&lt;br /&gt;            // TODO Auto-generated catch block&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;        logger.error("mosramos un error");&lt;br /&gt;       &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6369724969284429389?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6369724969284429389/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6369724969284429389' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6369724969284429389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6369724969284429389'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/03/para-los-logs-de-los-procesos.html' title='para los logs de los procesos'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8767274071179386320</id><published>2010-03-17T01:56:00.002+01:00</published><updated>2010-03-17T02:01:10.982+01:00</updated><title type='text'>New (3.2.3) Hibernate identifier generators</title><content type='html'>Desde la url &lt;a href="http://in.relation.to/Bloggers/HibernateCore331Released"&gt;Hibernate Core 3.3.1 released&lt;/a&gt;, pinchamos en &lt;a href="http://in.relation.to/Bloggers/New323HibernateIdentifierGenerators" target="" class="regularLink"&gt;enhanced id generators&lt;/a&gt; y accedemos a una página donde se detallan exhaustivamente los drásticos cambios que se han hecho en esta versión.&lt;br /&gt;&lt;br /&gt;Lo más importante es lo que pone en la conclusion:&lt;br /&gt;&lt;br /&gt;&lt;h2 style="font-family: times new roman; font-style: italic; color: rgb(0, 153, 0);" class="wikiHeadline2" id="H-Conclusion"&gt;&lt;a href="http://in.relation.to/Bloggers/New323HibernateIdentifierGenerators#H-Conclusion"&gt;Conclusion&lt;/a&gt;&lt;/h2&gt;  &lt;p style="font-family: times new roman; font-style: italic; color: rgb(0, 153, 0);" class="wikiPara"&gt; I would expect that these two new generators actually replace currently existing ones in terms of &lt;q&gt;short-hand names&lt;/q&gt;.  Specifically, I would expect &lt;/p&gt;  &lt;ul style="font-family: times new roman; font-style: italic; color: rgb(0, 153, 0);" class="wikiUnorderedList"&gt;&lt;li class="wikiUnorderedListItem"&gt; the implementation behind &lt;q&gt;sequence&lt;/q&gt; to change from org.hibernate.SequenceGenerator to the new org.hibernate.id.enhanced.SequenceStyleGenerator&lt;/li&gt;&lt;/ul&gt;  &lt;ul style="font-family: times new roman; font-style: italic; color: rgb(0, 153, 0);" class="wikiUnorderedList"&gt;&lt;li class="wikiUnorderedListItem"&gt; the implementation behing &lt;q&gt;table&lt;/q&gt; to change from org.hibernate.TableGenerator to the new org.hibernate.id.enhanced.TableGenerator&lt;/li&gt;&lt;/ul&gt;  &lt;p style="font-family: times new roman; font-style: italic; color: rgb(0, 153, 0);" class="wikiPara"&gt; The second is the more risky replacement because of the big difference between the two. But we've all along discouraged direct use of the current &lt;q&gt;table&lt;/q&gt; generator so I think we should be safe there. I am still uncertain when that replacement will happen (probably 4.0?), but in the meantime, the new generators are available and &lt;span class="wikiEmphasis"&gt;highly&lt;/span&gt; recommended for use. &lt;/p&gt;Hay que pensarlo bien, parece que lo mejor es usar estos nuevos generadores&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8767274071179386320?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8767274071179386320/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8767274071179386320' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8767274071179386320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8767274071179386320'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/03/new-323-hibernate-identifier-generators.html' title='New (3.2.3) Hibernate identifier generators'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-1481118544346122455</id><published>2010-03-17T00:47:00.001+01:00</published><updated>2010-03-17T00:49:58.195+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam exceptions'/><title type='text'>Unified error page and exception handling</title><content type='html'>&lt;h1 class="documentTitle"&gt;&lt;a href="http://seamframework.org/Documentation/UnifiedErrorPageAndExceptionHandling"&gt;Unified error page and exception handling&lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;&lt;p class="wikiPara"&gt; A web application can run into a server-side error for many different reasons and at any point in time. Finding the right strategy for your application, how to deal with these error conditions and exceptional situations, can be difficult. This page provides some guidelines and a simple but effective solution. &lt;/p&gt;  &lt;p class="wikiPara"&gt;When a client request is handled by a web application server, exceptions can be thrown by code at any time. Typically, you need to consider: &lt;/p&gt;  &lt;ul class="wikiUnorderedList"&gt;&lt;li class="wikiUnorderedListItem"&gt; Exceptions thrown by the web application server, usually the servlet container. For example, exceptions you definitely have to expect and handle include session limit violations. If your servlet container reaches its configured maximum active session limit, your users should be presented with a nice error message that tells them to come back later.&lt;/li&gt;&lt;/ul&gt;  &lt;ul class="wikiUnorderedList"&gt;&lt;li class="wikiUnorderedListItem"&gt; Exceptions can be thrown by the web application frameworks and 3rd party libraries you are using. In a Seam application, those frameworks would typically include JSF, Facelets, Hibernate, and of course Seam and any of its integration modules. There are many exceptions that are obvioulsy related to bugs in your application, for these you might want to encourage the users to report these with a nice message. But you also have other exceptions, such as database lock acquisition failures, that indicate an overloaded system, which does not necessarily require a bug report.&lt;/li&gt;&lt;/ul&gt;  &lt;ul class="wikiUnorderedList"&gt;&lt;li class="wikiUnorderedListItem"&gt; Finally, you have your own error handling in your web application. You use (runtime) infrastructure exceptions to indicate fatal error conditions which should be reported by users when they encounter them. You use (checked) application exceptions that are expected and are handled in your code, probably without even letting the users know that some exceptional application flow occurred behind the scenes.&lt;/li&gt;&lt;/ul&gt;  &lt;h2 class="wikiHeadline2" id="H-HandlingRecoverableExceptions"&gt;&lt;a href="http://seamframework.org/Documentation/UnifiedErrorPageAndExceptionHandling#H-HandlingRecoverableExceptions"&gt;Handling recoverable exceptions&lt;/a&gt;&lt;/h2&gt;  &lt;p class="wikiPara"&gt; Seam comes with an exception handling servlet filter that wraps its processing of a request: &lt;/p&gt;  &lt;pre class="wikiPreformatted"&gt;&lt;web:exception-filter pattern="*.seam"&gt;&lt;/web:exception-filter&gt;&lt;/pre&gt;&lt;a href="http://seamframework.org/Documentation/UnifiedErrorPageAndExceptionHandling"&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0); font-family: times new roman;"&gt;(... seguir leyendo en el sitio original)&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-1481118544346122455?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/1481118544346122455/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=1481118544346122455' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1481118544346122455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1481118544346122455'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/03/unified-error-page-and-exception.html' title='Unified error page and exception handling'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-26996833154266557</id><published>2010-03-16T22:46:00.004+01:00</published><updated>2010-03-17T00:45:09.111+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam exceptions'/><category scheme='http://www.blogger.com/atom/ns#' term='hermes'/><title type='text'>hermes: exceptions</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(0, 153, 0);font-size:130%;" &gt;Enabling Seam exception handling&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;mirar seam_reference: &lt;span style="color: rgb(102, 51, 255); font-style: italic;"&gt;6.12.2. Enabling Seam exception handling&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;You  need  to  disable  Facelets  development  mode  in  web.xml  and  Seam  debug  mode  in&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;components.xml if you want your exception handlers to fire&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;--------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Las excepciones que sean gordas las podemos redirigir desde la misma excepción:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;@Redirect(viewId="/failure.xhtml", end=true)&lt;br /&gt;@ApplicationException&lt;br /&gt;public class UnrecoverableApplicationException extends RuntimeException { ... }&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Esta excepción hace que se redirija siempre que se propague fuera de la capa de componentes Seam. Asímismo finaliza la conversación.&lt;br /&gt;&lt;br /&gt;-----&lt;br /&gt;&lt;br /&gt;hay que declarar en el components.xml:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;core:resource-loader&amp;gt;&lt;br /&gt;       &amp;lt;core:bundle-names&amp;gt;&lt;br /&gt;           &amp;lt;value&amp;gt;messages&amp;lt;/value&amp;gt;&lt;br /&gt;       &amp;lt;/core:bundle-names&amp;gt;&lt;br /&gt;   &amp;lt;/core:resource-loader&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;---------&lt;br /&gt;&lt;br /&gt;cualquiera de estas dos formas de coger los mensajes en la excepción funciona:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;String msg1 = SeamResourceBundle.getBundle().getString("exception.myexception");&lt;br /&gt;       &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;String msg2 = ResourceBundle.getBundle("messages", FacesContext.getCurrentInstance().getViewRoot().getLocale()).getString("exception.myexception");&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;-------------&lt;br /&gt;&lt;br /&gt;En el messages.properties:&lt;br /&gt;&lt;br /&gt;exception.message1=Eureka, dijo {0}&lt;br /&gt;&lt;br /&gt;Esta excepción funciona:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;import org.jboss.seam.core.Interpolator;&lt;br /&gt;import org.jboss.seam.core.SeamResourceBundle;&lt;br /&gt;&lt;br /&gt;public class MyException extends Exception {&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public String getMessage() {&lt;br /&gt;&lt;br /&gt;        String msg1 = SeamResourceBundle.getBundle().getString(&lt;br /&gt;                "exception.message1");&lt;br /&gt;        String msg2 = Interpolator.instance().interpolate(msg1, "Arquímedes");&lt;br /&gt;&lt;br /&gt;        return msg2;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-26996833154266557?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/26996833154266557/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=26996833154266557' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/26996833154266557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/26996833154266557'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2010/03/hermes-exceptions.html' title='hermes: exceptions'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6297256929188534123</id><published>2009-12-30T01:14:00.001+01:00</published><updated>2009-12-30T01:14:37.625+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate isolation level'/><title type='text'>Setting an isolation level</title><content type='html'>Setting an isolation level&lt;br /&gt;Every JDBC connection to a database is in the default isolation level of the DBMS—&lt;br /&gt;usually read committed or repeatable read. You can change this default in the&lt;br /&gt;DBMS configuration. You may also set the transaction isolation for JDBC connec-&lt;br /&gt;tions on the application side, with a Hibernate configuration option: &lt;br /&gt;hibernate.connection.isolation = 4&lt;br /&gt; Hibernate sets this isolation level on every JDBC connection obtained from a&lt;br /&gt;connection pool before starting a transaction. The sensible values for this option&lt;br /&gt;are as follows (you may also find them as constants in java.sql.Connection): &lt;br /&gt;■ 1—Read uncommitted isolation &lt;br /&gt;■ 2—Read committed isolation &lt;br /&gt;■ 4—Repeatable read isolation &lt;br /&gt;■ 8—Serializable isolation &lt;br /&gt;Note that Hibernate never changes the isolation level of connections obtained&lt;br /&gt;from an application server-provided database connection in a managed environ-&lt;br /&gt;ment! You can change the default isolation using the configuration of your appli-&lt;br /&gt;cation server. (The same is true if you use a stand-alone JTA implementation.) &lt;br /&gt; As you can see, setting the isolation level is a global option that affects all con-&lt;br /&gt;nections and transactions. From time to time, it’s useful to specify a more restric-&lt;br /&gt;tive lock for a particular transaction. Hibernate and Java Persistence rely on&lt;br /&gt;optimistic concurrency control, and both allow you to obtain additional locking&lt;br /&gt;guarantees with version checking and pessimistic locking.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6297256929188534123?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6297256929188534123/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6297256929188534123' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6297256929188534123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6297256929188534123'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/setting-isolation-level.html' title='Setting an isolation level'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3735783902216604115</id><published>2009-12-30T00:39:00.003+01:00</published><updated>2009-12-30T00:41:41.939+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='transaction'/><title type='text'>Transaction types</title><content type='html'>&lt;table&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;RESOURCE-LOCAL&lt;/td&gt;&lt;td&gt;=&gt;&lt;/td&gt;&lt;td&gt;EntityTransaction&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;JTA&lt;/td&gt;&lt;td&gt;=&gt;&lt;/td&gt;&lt;td&gt;UserTransaction&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3735783902216604115?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3735783902216604115/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3735783902216604115' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3735783902216604115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3735783902216604115'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/transaction-types.html' title='Transaction types'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-4955352075296782848</id><published>2009-12-30T00:12:00.001+01:00</published><updated>2009-12-30T00:13:29.377+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate exceptions'/><title type='text'>Hibernate exceptions</title><content type='html'>Any Hibernate operation, including flushing the persistence context, can throw a&lt;br /&gt;RuntimeException. Even rolling back a transaction can throw an exception! You&lt;br /&gt;want to catch this exception and log it; otherwise, the original exception that led&lt;br /&gt;to the rollback is swallowed.&lt;br /&gt; An optional method call in the example is  setTimeout(), which takes the&lt;br /&gt;number of seconds a transaction is allowed to run. However, real monitored trans-&lt;br /&gt;actions aren’t available in a Java SE environment. The best Hibernate can do if&lt;br /&gt;you run this code outside of an application server (that is, without a transaction&lt;br /&gt;manager) is to set the number of seconds the driver will wait for a Prepared-&lt;br /&gt;Statement to execute (Hibernate exclusively uses prepared statements). If the&lt;br /&gt;limit is exceeded, an SQLException is thrown.&lt;br /&gt;&lt;br /&gt; You don’t want to use this example as a template in your own application,&lt;br /&gt;because you should hide the exception handling with generic infrastructure code.&lt;br /&gt;You can, for example, write a single error handler for  RuntimeException that&lt;br /&gt;knows when and how to roll back a transaction. The same can be said about open-&lt;br /&gt;ing and closing a Session. We discuss this with more realistic examples later in&lt;br /&gt;the next chapter and again in chapter 16, section 16.1.3, “The Open Session in&lt;br /&gt;View pattern.”&lt;br /&gt; Hibernate throws typed exceptions, all subtypes of RuntimeException that help&lt;br /&gt;you identify errors:&lt;br /&gt;■ The most common  HibernateException is a generic error. You have to&lt;br /&gt;either check the exception message or find out more about the cause by&lt;br /&gt;calling getCause() on the exception.&lt;br /&gt;■ A  JDBCException is any exception thrown by Hibernate’s internal  JDBC&lt;br /&gt;layer. This kind of exception is always caused by a particular SQL statement,&lt;br /&gt;and you can get the offending statement with  getSQL(). The internal&lt;br /&gt;exception thrown by the  JDBC connection (the  JDBC driver, actually) is&lt;br /&gt;available with  getSQLException() or  getCause(), and the database- and&lt;br /&gt;vendor-specific error code is available with getErrorCode().&lt;br /&gt;■ Hibernate includes subtypes of JDBCException and an internal converter&lt;br /&gt;that tries to translate the vendor-specific error code thrown by the database&lt;br /&gt;driver into something more meaningful. The built-in converter can pro-&lt;br /&gt;duce JDBCConnectionException, SQLGrammarException, LockAquisition-&lt;br /&gt;Exception,  DataException, and  ConstraintViolationException for the&lt;br /&gt;most important database dialects supported by Hibernate. You can either&lt;br /&gt;manipulate or enhance the dialect for your database, or plug in a SQLEx-&lt;br /&gt;ceptionConverterFactory to customize this conversion.&lt;br /&gt;■ Other RuntimeExceptions thrown by Hibernate should also abort a transac-&lt;br /&gt;tion. You should always make sure you catch RuntimeException, no matter&lt;br /&gt;what you plan to do with any fine-grained exception-handling strategy.&lt;br /&gt;&lt;br /&gt;You now know what exceptions you should catch and when to expect them. How-&lt;br /&gt;ever, one question is probably on your mind: What should you do  after you’ve&lt;br /&gt;caught an exception?&lt;br /&gt; All exceptions thrown by Hibernate are fatal. This means you have to roll back&lt;br /&gt;the database transaction and close the current Session. You aren’t allowed to con-&lt;br /&gt;tinue working with a Session that threw an exception.&lt;br /&gt;&lt;br /&gt;Usually, you also have to exit the application after you close the Session fol-&lt;br /&gt;lowing an exception, although there are some exceptions (for example, Stale-&lt;br /&gt;ObjectStateException) that naturally lead to a new attempt (possibly after&lt;br /&gt;interacting with the application user again) in a new Session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-4955352075296782848?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/4955352075296782848/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=4955352075296782848' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4955352075296782848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4955352075296782848'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/hibernate-exceptions.html' title='Hibernate exceptions'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-709200981575806139</id><published>2009-12-30T00:07:00.001+01:00</published><updated>2009-12-30T00:09:08.160+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate exceptions'/><title type='text'>A history of exceptions</title><content type='html'>Exceptions and how they should be handled always&lt;br /&gt;end in heated debates between Java developers. It isn’t surprising that&lt;br /&gt;Hibernate has some noteworthy history as well. Until Hibernate 3.x, all&lt;br /&gt;exceptions thrown by Hibernate were checked exceptions, so every Hiber-&lt;br /&gt;nate API forced the developer to catch and handle exceptions. This strat-&lt;br /&gt;egy was influenced by JDBC, which also throws only checked exceptions.&lt;br /&gt;However, it soon became clear that this doesn’t make sense, because all&lt;br /&gt;exceptions thrown by Hibernate are fatal. In many cases, the best a&lt;br /&gt;developer can do in this situation is to clean up, display an error message,&lt;br /&gt;and exit the application. Therefore, starting with Hibernate 3.x, all&lt;br /&gt;exceptions thrown by Hibernate are subtypes of the unchecked Runtime-&lt;br /&gt;Exception, which is usually handled in a single location in an application.&lt;br /&gt;This also makes any Hibernate template or wrapper API obsolete.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-family: courier new; color: rgb(0, 0, 102);"&gt;Manning.Java.Persistence.with.Hibernate.Nov.2006.pdf&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-709200981575806139?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/709200981575806139/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=709200981575806139' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/709200981575806139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/709200981575806139'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/history-of-exceptions.html' title='A history of exceptions'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8615617074293813076</id><published>2009-12-06T22:01:00.001+01:00</published><updated>2009-12-06T22:03:28.806+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java jar dependencies libraries ClassNotFoundException'/><title type='text'>Have you ever found yourself frustrated with a ClassNotFoundException?</title><content type='html'>&lt;a href="http://www.jboss.org/tattletale"&gt;Tattletale&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;Have you ever found yourself frustrated with a ClassNotFoundException?       Would you like to know what libraries are in your project and what they depend on?       Would you like to get a full report on this stuff every time you run your ant build?       If so you need to use the JBoss Tattletale project!&lt;/p&gt;&lt;p&gt;JBoss Tattletale is a tool that can help you get an overview of the project you are       working on or a product that you depend on.&lt;/p&gt;&lt;p&gt;The tool will provide you with reports that can help you&lt;/p&gt;&lt;div class="itemizedlist"&gt;&lt;ul compact="compact" type="disc"&gt;&lt;li&gt;&lt;p&gt;Identify dependencies between JAR files&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Find missing classes from the classpath&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Spot if a class/package is located in multiple JAR files&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Spot if the same JAR file is located in multiple locations&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;With a list of what each JAR file requires and provides&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Verify the SerialVersionUID of a class&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Find similar JAR files that have different version numbers&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Find JAR files without a version number&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Find unused JAR files&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Identify sealed and signed JAR archives&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Locate a class in a JAR file&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Get the OSGi status of your project&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;JBoss Tattletale will recursive scan the directory pass as the argument for JAR files and then      build the reports as HTML files.&lt;/p&gt;&lt;p&gt;JBoss Tattletale is licensed under GNU Lesser General Public License (LGPL) version 2.1 or later.&lt;/p&gt;&lt;p&gt;We hope that JBoss Tattletale will help you in your development tasks !&lt;/p&gt;&lt;p&gt;Please, visit the official JBoss Tattletale project page at       &lt;a href="http://www.jboss.org/tattletale/" target="_top"&gt;http://www.jboss.org/tattletale/&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8615617074293813076?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8615617074293813076/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8615617074293813076' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8615617074293813076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8615617074293813076'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/have-you-ever-found-yourself-frustrated.html' title='Have you ever found yourself frustrated with a ClassNotFoundException?'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-1055627789476020219</id><published>2009-12-06T01:48:00.001+01:00</published><updated>2009-12-06T02:02:42.324+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam JavaBeans'/><title type='text'>JavaBeans</title><content type='html'>Javabeans may be used just like a stateless or stateful session bean. However, &lt;span style="font-weight:bold;"&gt;they do not provide the  functionality  of  a  session  bean  (declarative  transaction  demarcation,  declarative  security, efficient clustered state replication, EJB 3.0 persistence, timeout methods, etc)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Seam  JavaBean  components  may  be  instantiated  using  &lt;span style="font-weight:bold;"&gt;Component.getInstance()&lt;/span&gt;  or&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;@In(create=true)&lt;/span&gt;. They should not be directly instantiated using the new operator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-1055627789476020219?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/1055627789476020219/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=1055627789476020219' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1055627789476020219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1055627789476020219'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/javabeans.html' title='JavaBeans'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-9024924940233847423</id><published>2009-12-06T01:44:00.001+01:00</published><updated>2009-12-06T01:47:41.445+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam entity'/><title type='text'>Entity beans</title><content type='html'>Entity beans are not usually used as JSF action listeners, but do often function as backing beans that  provide  properties  to  JSF  components  for  display  or  form  submission.  In  particular,  it  is common to &lt;span style="font-weight:bold;"&gt;use an entity as a backing bean, together with a stateless session bean action listener to implement create/update/delete type functionality&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Seam  entity  bean  components  may  be  instantiated  using  &lt;span style="font-weight:bold;"&gt;Component.getInstance()&lt;/span&gt;,&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;@In(create=true)&lt;/span&gt; or directly using the &lt;span style="font-weight:bold;"&gt;new operator&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-9024924940233847423?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/9024924940233847423/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=9024924940233847423' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/9024924940233847423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/9024924940233847423'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/entity-beans.html' title='Entity beans'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6971953129631070429</id><published>2009-12-06T01:42:00.001+01:00</published><updated>2009-12-06T01:44:55.910+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam sfsb'/><title type='text'>Stateful session beans</title><content type='html'>Application state that does not belong in the database should  usually  be  held  by  stateful  session  beans.  Instead of sticking  information about  the current&lt;br /&gt;conversation directly  in  the HttpSession, you should keep  it  in  instance variables of a stateful session bean that is bound to the conversation context.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Stateful session beans are often used as JSF action listener, and as backing beans that provide properties to JSF components for display or form submission.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Seam stateful session bean components may be instantiated using Component.getInstance()&lt;br /&gt;or  @In(create=true)&lt;/span&gt;.  They  should  not  be  directly  instantiated  via  JNDI  lookup  or  the  new operator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6971953129631070429?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6971953129631070429/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6971953129631070429' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6971953129631070429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6971953129631070429'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/stateful-session-beans.html' title='Stateful session beans'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3217404409918619935</id><published>2009-12-06T01:40:00.001+01:00</published><updated>2009-12-06T01:42:06.792+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam stateless slsb'/><title type='text'>Stateless session beans</title><content type='html'>Stateless  session  beans  can  be  accessed  concurrently  as  a  new  instance  is  used  for  each request. Assigning the instance to the request is the responsibility of the EJB3 container (normally instances will be allocated from a reusable pool meaning that you may find any instance variables contain data from previous uses of the bean).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Seam stateless session bean components may be instantiated using Component.getInstance() or  @In(create=true)&lt;/span&gt;.  They  should  not  be  directly  instantiated  via  JNDI  lookup  or  the  new operator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3217404409918619935?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3217404409918619935/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3217404409918619935' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3217404409918619935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3217404409918619935'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/stateless-session-beans.html' title='Stateless session beans'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3139876437199501299</id><published>2009-12-05T03:14:00.002+01:00</published><updated>2009-12-05T03:56:10.620+01:00</updated><title type='text'>El catalán es un dialecto del español</title><content type='html'>definiciones:&lt;br /&gt;&lt;br /&gt;&lt;p style="margin-left: 0em; margin-bottom: -0.5em;"&gt;&lt;span class="eLema"&gt;&lt;b&gt;dialecto&lt;/b&gt;&lt;/span&gt;&lt;span class="eLema"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;span class="eEtimo"&gt; (&lt;a&gt;Del&lt;/a&gt; &lt;a title="latín, latino o latina"&gt;lat.&lt;/a&gt; &lt;i&gt;dialectus,&lt;/i&gt;&lt;/span&gt;&lt;span class="eEtimo"&gt; y este &lt;a&gt;del&lt;/a&gt; &lt;a title="griego o griega"&gt;gr.&lt;/a&gt; διάλεκτος).&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_1"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 1.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt;&lt;i&gt; &lt;span class="eAbrv" title="Lingüística"&gt;Ling.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Sistema lingüístico considerado con relación al grupo de los varios derivados de un tronco común. &lt;span class="eEjemplo"&gt;&lt;i&gt;El español es uno de los dialectos nacidos del latín.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_2"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 2.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt;&lt;i&gt; &lt;span class="eAbrv" title="Lingüística"&gt;Ling.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; &lt;span style="font-weight: bold;"&gt;Sistema lingüístico derivado de otro, normalmente con una concreta limitación geográfica, pero sin diferenciación suficiente frente a otros de origen común.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_3"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 3.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt;&lt;i&gt; &lt;span class="eAbrv" title="Lingüística"&gt;Ling.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Estructura lingüística, simultánea a otra, que no alcanza la categoría social de lengua.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span class="eLema"&gt;&lt;b&gt;lengua&lt;/b&gt;&lt;/span&gt;&lt;span class="eLema"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;span class="eEtimo"&gt; (&lt;a&gt;Del&lt;/a&gt; &lt;a title="latín, latino o latina"&gt;lat.&lt;/a&gt; &lt;i&gt;lingua&lt;/i&gt;).&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_1"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 1.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="nombre femenino"&gt;f.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Órgano muscular situado en la cavidad de la boca de los vertebrados y que sirve para gustación, para deglutir y para modular los sonidos que les son propios.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_2"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 2.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="nombre femenino"&gt;f.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Sistema de comunicación verbal y casi siempre escrito, propio de una comunidad humana.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_3"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 3.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="nombre femenino"&gt;f.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Sistema lingüístico cuyos hablantes reconocen modelos de buena expresión. &lt;span class="eEjemplo"&gt;&lt;i&gt;La lengua de Cervantes es oficial en 21 naciones&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_4"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 4.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="nombre femenino"&gt;f.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Sistema lingüístico considerado en su estructura.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_5"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 5.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="nombre femenino"&gt;f.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Vocabulario y gramática propios y característicos de una época, de un escritor o de un grupo social. &lt;span class="eEjemplo"&gt;&lt;i&gt;La lengua de Góngora&lt;/i&gt;&lt;/span&gt; &lt;span class="eEjemplo"&gt;&lt;i&gt;La lengua gauchesca&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;p style="margin-left: 0em; margin-bottom: -0.5em;"&gt;&lt;span class="eLema"&gt;&lt;b&gt;idioma&lt;/b&gt;&lt;/span&gt;&lt;span class="eLema"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;span class="eEtimo"&gt; (&lt;a&gt;Del&lt;/a&gt; &lt;a title="latín, latino o latina"&gt;lat.&lt;/a&gt; &lt;i&gt;idiōma,&lt;/i&gt;&lt;/span&gt;&lt;span class="eEtimo"&gt; y este &lt;a&gt;del&lt;/a&gt; &lt;a title="griego o griega"&gt;gr.&lt;/a&gt; ἰδίωμα, propiedad privada).&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_1"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 1.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Lengua de un pueblo o nación, o común a varios.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;p style="margin-left: 0em; margin-bottom: -0.5em;"&gt;&lt;span class="eLema"&gt;&lt;b&gt;catalán&lt;/b&gt;&lt;/span&gt;&lt;span class="eGenero"&gt;&lt;b&gt;, na&lt;/b&gt;&lt;/span&gt;&lt;span class="eLema"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_1"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 1.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="adjetivo"&gt;adj.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Natural de Cataluña. &lt;span class="eAbrv" title="Usado, usada o usadas también como sustantivo"&gt;U. t. c. s.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_2"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 2.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="adjetivo"&gt;adj.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Perteneciente o relativo a este antiguo principado, hoy comunidad autónoma de España.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_3"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 3.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 153);"&gt;Lengua romance vernácula que se habla en Cataluña y en otros dominios de la antigua Corona de Aragón.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr /&gt;&lt;span class="eLema"&gt;&lt;b&gt;castellano&lt;/b&gt;&lt;/span&gt;&lt;span class="eGenero"&gt;&lt;b&gt;, na&lt;/b&gt;&lt;/span&gt;&lt;span class="eLema"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;span class="eEtimo"&gt; (&lt;a&gt;Del&lt;/a&gt; &lt;a title="latín, latino o latina"&gt;lat.&lt;/a&gt; &lt;i&gt;Castellānus&lt;/i&gt;).&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_1"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 1.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="adjetivo"&gt;adj.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Natural de Castilla. &lt;span class="eAbrv" title="Usado, usada o usadas también como sustantivo"&gt;U. t. c. s.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_2"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 2.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="adjetivo"&gt;adj.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Perteneciente o relativo a esta región de España.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_3"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 3.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="adjetivo"&gt;adj.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Dicho de una gallina: De cierta variedad negra muy ponedora.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_4"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 4.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; &lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;Lengua española, especialmente cuando se quiere introducir una distinción respecto a otras lenguas habladas también como propias en España.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_5"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 5.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;Dialecto románico nacido en Castilla la Vieja, del que tuvo su origen la lengua española.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_6"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 6.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;Variedad de la lengua española hablada modernamente en Castilla la Vieja.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;span class="eLema"&gt;&lt;b&gt;español&lt;/b&gt;&lt;/span&gt;&lt;span class="eGenero"&gt;&lt;b&gt;, la&lt;/b&gt;&lt;/span&gt;&lt;span class="eLema"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;span class="eEtimo"&gt; (&lt;a&gt;Del&lt;/a&gt; &lt;a title="provenzal"&gt;prov.&lt;/a&gt; &lt;i&gt;espaignol,&lt;/i&gt;&lt;/span&gt;&lt;span class="eEtimo"&gt; y este &lt;a&gt;del&lt;/a&gt; &lt;a title="latín, latino o latina"&gt;lat.&lt;/a&gt; &lt;a title="medieval"&gt;mediev.&lt;/a&gt; &lt;i&gt;Hispaniŏlus&lt;/i&gt;, de Hispania, España).&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_1"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 1.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="adjetivo"&gt;adj.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Natural de España. &lt;span class="eAbrv" title="Usado, usada o usadas también como sustantivo"&gt;U. t. c. s.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_2"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 2.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrvNoEdit"&gt; &lt;span class="eAbrvNoEdit" title="adjetivo"&gt;adj.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; Perteneciente o relativo a este país de Europa.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 2em; margin-bottom: -0.5em;"&gt;&lt;a name="0_3"&gt;&lt;/a&gt;&lt;span class="eOrdenAcepLema"&gt;&lt;b&gt; 3.     &lt;/b&gt;&lt;/span&gt;&lt;span class="eAbrv"&gt; &lt;span class="eAbrv" title="nombre masculino"&gt;m.&lt;/span&gt;&lt;/span&gt;&lt;span class="eAcep"&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 153);"&gt;Lengua común de España y de muchas naciones de América, hablada también como propia en otras partes del mundo.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;a favor:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;en contra:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3139876437199501299?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3139876437199501299/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3139876437199501299' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3139876437199501299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3139876437199501299'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/el-catalan-es-un-dialecto-del-espanol.html' title='El catalán es un dialecto del español'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7633207090625361865</id><published>2009-12-04T03:55:00.004+01:00</published><updated>2010-03-17T14:03:23.510+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hsqldb'/><title type='text'>hsqldb</title><content type='html'>para instalar y gestionar bases de datos hsqldb:&lt;br /&gt;&lt;br /&gt;1.- bajar hsqldb de su web&lt;br /&gt;2.- descomprimir en c:\hsqldb&lt;br /&gt;3,. ejecutar&lt;br /&gt;&lt;blockquote&gt; java -cp lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb&lt;/blockquote&gt;&lt;br /&gt;4.- ejecutar desde demo:&lt;br /&gt;&lt;blockquote&gt; runManagerSwing.bat&lt;/blockquote&gt;&lt;br /&gt;5.- conectar mediante el wizard del manager &lt;span style="font-style: italic;"&gt;(jdbc:hsqldb:hsql://localhost/xdb)&lt;/span&gt;&lt;br /&gt;6.- generar el esquema ejecutando:&lt;br /&gt;&lt;blockquote&gt;CREATE SCHEMA ROOT AUTHORIZATION dba;&lt;br /&gt;SET SCHEMA ROOT;&lt;br /&gt;CREATE USER root PASSWORD root ADMIN;&lt;br /&gt;&lt;/blockquote&gt;7.- crear las tablas como por ejemplo:&lt;br /&gt;&lt;blockquote&gt;create table MESSAGES (&lt;br /&gt;      MESSAGE_ID bigint generated by default as identity (start with 1),&lt;br /&gt;      MESSAGE_TEXT varchar(255),&lt;br /&gt;      NEXT_MESSAGE_ID bigint,&lt;br /&gt;      primary key (MESSAGE_ID)&lt;br /&gt;  );&lt;br /&gt;&lt;br /&gt;  alter table MESSAGES&lt;br /&gt;      add constraint FK131AF14C3CD7F3EA&lt;br /&gt;      foreign key (NEXT_MESSAGE_ID)&lt;br /&gt;      references MESSAGES;&lt;/blockquote&gt;8.- Desde el HSQL Manager seleccionamos &lt;span style="font-weight: bold;"&gt;Schemas -&gt; HERMES&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7633207090625361865?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7633207090625361865/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7633207090625361865' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7633207090625361865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7633207090625361865'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/hsqldb.html' title='hsqldb'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-400504604583541605</id><published>2009-12-03T23:04:00.004+01:00</published><updated>2009-12-05T20:32:34.018+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate3:hbm2ddl'/><title type='text'>hibernate3:hbm2ddl</title><content type='html'>&lt;h2&gt;&lt;a href="http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/hbm2ddl-mojo.html"&gt;hibernate3:hbm2ddl&lt;/a&gt;&lt;/h2&gt;&lt;ol&gt;&lt;li&gt;la solución más fácil para lo del esquema en hsqldb es crear el esquema a mano desde &lt;span style="font-weight: bold;"&gt;HSQLDB database manager&lt;/span&gt;&lt;/li&gt;&lt;li&gt;otra solución sencilla puede ser definir el esquema en orm.xml y eliminarlo de las entities (lo que ponga en el orm.xml sobreescribe lo que ponga en anotaciones)&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 153, 0); font-weight: bold;"&gt;la solución óptima parece ser eliminar @Table de las entities y declarar el default_schema en persistence.xml, en hibernate.properties y/o en hibernate.cfg.xml&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 153, 0); font-weight: bold;"&gt;&lt;blockquote&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"&lt;br /&gt;               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;               xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"&lt;br /&gt;               version="1.0"&amp;gt;&lt;br /&gt;              &lt;br /&gt;  &amp;lt;persistence-unit-metadata&amp;gt;         &lt;br /&gt;    &amp;lt;persistence-unit-defaults&amp;gt;         &lt;br /&gt;      &amp;lt;schema&gt;hermes&amp;lt;/schema&amp;gt;&lt;br /&gt;    &amp;lt;/persistence-unit-defaults&amp;gt;        &lt;br /&gt;  &amp;lt;/persistence-unit-metadata&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/entity-mappings&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;la solución más elegante, aunque mucho más complicada, es aplicar los parches a:&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;src/org/hibernate/dialect/Dialect.java&lt;/li&gt;&lt;li&gt;src/org/hibernate/dialect/HSQLDialect.java&lt;/li&gt;&lt;li&gt;src/org/hibernate/cfg/Configuration.java&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-400504604583541605?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/400504604583541605/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=400504604583541605' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/400504604583541605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/400504604583541605'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/12/hibernate3hbm2ddl.html' title='hibernate3:hbm2ddl'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-4012211980119465380</id><published>2009-11-30T04:36:00.003+01:00</published><updated>2009-11-30T05:45:15.153+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='palestina'/><title type='text'>Palestina: región o estado</title><content type='html'>fuente: &lt;a href="http://www.mgar.net/africa/israel.htm"&gt;http://www.mgar.net/africa/israel.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;El plan de las Naciones Unidas (1947):&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;...Contemplaba la división de Palestina en dos países independientes&lt;br /&gt;&lt;br /&gt;...Hasta el punto de que éstos, ante la imposibilidad de resolver un problema cada vez más enrevesado, recurrieron a las Naciones Unidas, que en célebre reunión del 19 de noviembre de 1947 decidió la partición de &lt;a href="http://www.mgar.net/africa/palestin.htm"&gt;Palestina&lt;/a&gt; en &lt;span style="font-weight: bold;"&gt;dos Estados: uno israelí y otro árabe&lt;/span&gt; con una zona internacional para &lt;a href="http://www.mgar.net/africa/jerusale.htm"&gt;Jerusalén&lt;/a&gt;. Poco después se proclamaría la independencia del Estado judío el 15 de mayo de 1948, con la huida masiva de palestinos de su territorio. Y la guerra que siguió, hasta 1949, permitió ampliar el espacio israelí en 5.000 kilómetros cuadrados sobre la previa partición de la ONU, incluyendo una zona muy importante de &lt;a href="http://www.mgar.net/africa/jerusale.htm"&gt;Jerusalén&lt;/a&gt;. La Palestina árabe quedó sometida a sendos despojos, la franja de Gaza y de Cisjordania.(Ramón Tamames)&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;h2 class="entry_title"&gt;&lt;a href="http://lacomunidad.elpais.com/santi-casal/2009/1/8/palestina-estado-ocupado-pueblo-masacrado--2"&gt;Palestina: un Estado ocupado, un pueblo masacrado.&lt;/a&gt;&lt;/h2&gt;...para que devuelvan a Palestina el status de &lt;span style="font-weight: bold;"&gt;nación libre y soberana&lt;/span&gt;.&lt;br /&gt;El pueblo palestino quiere recuperar &lt;span style="font-weight: bold;"&gt;su patria&lt;/span&gt;, su libertad.&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1 property="dc:title"&gt;&lt;a href="http://www.taringa.net/posts/noticias/1652736/Palestina;-Historia-de-un-pais-robado.html"&gt;Palestina; Historia de un pais robado&lt;/a&gt;&lt;/h1&gt;Este site describe MUY BIEN la historia palestina desde el siglo XV muy detalladamente&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;span style=";font-family:arial;font-size:130%;"  &gt;&lt;span style="color: rgb(204, 0, 0); font-weight: bold;"&gt;sites que defienden la idea de que no ha existido nunca un estado palestino:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.elimparcial.es/contenido/13682.html"&gt;http://www.elimparcial.es/contenido/13682.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Normalito"&gt;&lt;span class="Estilo29b"&gt;&lt;span class="Estilo27"&gt;De llegar a nacer, habría sido creado el primer país palestino en la historia pues, a diferencia de Israel, nunca antes ha constituido un Estado, si bien ha sido dominado por diferentes imperios como el romano, el turco otomano o, más tarde, el británico. &lt;b&gt;Palestina nunca ha constituido una entidad por sí misma&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;hr /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-4012211980119465380?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/4012211980119465380/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=4012211980119465380' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4012211980119465380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4012211980119465380'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/palestina-region-o-estado.html' title='Palestina: región o estado'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-467156359093111750</id><published>2009-11-29T06:01:00.001+01:00</published><updated>2009-11-29T06:03:13.608+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere was7'/><title type='text'>IBM WebSphere Application Server for Developers</title><content type='html'>&lt;a href="http://www.ibm.com/developerworks/downloads/ws/wasdevelopers/index.html"&gt;IBM WebSphere Application Server 7 for Developers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 class="post-title entry-title"&gt; &lt;a href="http://webspherecommunity.blogspot.com/2009/06/websphere-application-server-for.html"&gt;WebSphere Application Server for Developers - Now downloadable, No charge&lt;/a&gt; &lt;/h3&gt;   Want to try out WebSphere Application Server V7.0 for development?  Check!&lt;br /&gt;Want to do it without having to order a CD?  Check!&lt;br /&gt;Want to do it without having to work with purchasing?  Check!&lt;br /&gt;Want to do it by yourself as a developer?  Double Check!&lt;br /&gt;&lt;br /&gt;I talk to many developers who want to install WebSphere Application Server for development, but every license is tracked and installed by their operations team on some remote server. Working with the operations team and (gasp) purchasing would take more time than the time to write the application they wanted to write. So they go off and download some other runtime and later port the application back to WebSphere Application Server or abandon the project altogether.&lt;br /&gt;&lt;br /&gt;This won't be the story after today.  Go &lt;a href="http://www.ibm.com/developerworks/downloads/ws/wasdevelopers/index.html"&gt;here&lt;/a&gt; to download a no-charge copy of WebSphere Application Server for your development needs.&lt;br /&gt;&lt;br /&gt;From the download page:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Download WebSphere Application Server for Developers, a no-charge offering that satisfies the need for a no-cost WebSphere Application Server development runtime for projects that don't warrant the expense of a priced and supported runtime on the developer desktop. Reduce testing effort and develop with confidence using a runtime environment that is identical to the production runtime environment your applications will eventually run on.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-467156359093111750?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/467156359093111750/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=467156359093111750' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/467156359093111750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/467156359093111750'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/ibm-websphere-application-server-for.html' title='IBM WebSphere Application Server for Developers'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7496725237996691479</id><published>2009-11-29T03:08:00.001+01:00</published><updated>2009-11-29T03:11:34.989+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam jboss hermes'/><title type='text'>proyecto base para hermes con seam 2.2.0.GA y JBoss AS 5.1</title><content type='html'>El ejemplo Seam 2.2 Booking Example -(EAR including a tutorial) que podemos bajar desde eclipse nos puede servir de base para migrar hermes a seam 2.2.0, puesto que funcionan los test a la primera.&lt;br /&gt;&lt;br /&gt;Sólo hay que cambiar el servidor a JBoss AS 5.1 y seam a 2.2.0.GA&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7496725237996691479?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7496725237996691479/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7496725237996691479' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7496725237996691479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7496725237996691479'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/proyecto-base-para-hermes-con-seam.html' title='proyecto base para hermes con seam 2.2.0.GA y JBoss AS 5.1'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-4975376499735801554</id><published>2009-11-29T01:15:00.001+01:00</published><updated>2009-11-29T01:18:14.494+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maven jbossTools eclipse'/><title type='text'>Using Maven, Eclipse and JBoss Tools</title><content type='html'>&lt;h1&gt;&lt;a href="http://www.glxn.net/seam-maven-refimpl/doc/tutorial/02-eclipse.html"&gt;Using Maven, Eclipse and JBoss Tools&lt;/a&gt;&lt;/h1&gt;Para usar el template de proyectos seam mavenizados con eclipse&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0); font-weight: bold;"&gt;(muestra cómo configurar eclipse con UTF-8 en MUCHAS preferencias)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-4975376499735801554?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/4975376499735801554/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=4975376499735801554' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4975376499735801554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4975376499735801554'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/using-maven-eclipse-and-jboss-tools.html' title='Using Maven, Eclipse and JBoss Tools'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-1691126565755290686</id><published>2009-11-29T00:25:00.000+01:00</published><updated>2009-11-29T00:26:36.324+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam maven template'/><title type='text'>A Mavenized Seam Project Template</title><content type='html'>&lt;i&gt;&lt;a id="project_summary_link" href="http://code.google.com/p/seam-maven-refimpl/" style="text-decoration: none; color: rgb(0, 102, 0); font-weight: bold;"&gt;A Mavenized Seam Project Template&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;div id="wikicontent" style="padding: 0pt 3em 1.2em 0pt;"&gt;  &lt;p&gt;&lt;a href="http://www.knowit.no/index.php/knowiten/" rel="nofollow"&gt;Know IT Objectnet&lt;/a&gt; developers have created a Mavenized Seam project template. Due to the lack of Maven support in the Seam project, we felt the need to get a project started for the topic. After some research and development, the base was ready to be put in use. We felt that it was only right to make the project available to the public, and put together a google code project. As of now the project is aimed at running on the JBoss-4.2.3 and JBoss-5.x application servers deployed as an EAR project. &lt;/p&gt;&lt;p&gt;We welcome fellow Seam + Maven fans to this project. Whether you want to use this template to develop your own projects, or you want to contribute to the project, we invite you to check out the code. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.glxn.net/seam-maven-refimpl/doc/tutorial/" rel="nofollow"&gt;To get started check out this tutorial&lt;/a&gt; &lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-1691126565755290686?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/1691126565755290686/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=1691126565755290686' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1691126565755290686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1691126565755290686'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/mavenized-seam-project-template.html' title='A Mavenized Seam Project Template'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6361027540996491186</id><published>2009-11-26T03:20:00.001+01:00</published><updated>2009-11-26T03:20:50.967+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gestion proyectos'/><title type='text'>Manejar Proyectos J2EE</title><content type='html'>&lt;h1&gt;&lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#21_elegir"&gt;Manejar Proyectos J2EE&lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;1 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#intro"&gt;Introducción&lt;/a&gt;&lt;br /&gt;2 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#21_elegir"&gt;Elegir&lt;/a&gt;&lt;br /&gt;3 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#22_colaboracion"&gt;Colaboración del Equipo&lt;/a&gt;&lt;br /&gt;    3.1 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#221_repositorio"&gt;El Respositorio de Proyecto de Maven&lt;/a&gt;&lt;br /&gt;    3.2 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#222_pom"&gt;El Modelo de Objeto de Proyecto (POM) de Maven&lt;/a&gt;&lt;br /&gt;4 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#23_feedback"&gt;Obtener Feedback del Proyecto&lt;/a&gt;&lt;br /&gt;    4.1 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#231_cruise"&gt;Utilizar CruiseControl con Maven&lt;/a&gt;&lt;br /&gt;5 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#24_ciclo"&gt;Manejar el Ciclo Construir/Desplegar con un sólo Click&lt;/a&gt;&lt;br /&gt;6 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#25_varios"&gt;Desarrollar Varios Proyectos&lt;/a&gt;&lt;br /&gt;7 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#26_empaquetar"&gt;Empaquetar un Proyecto J2EE&lt;/a&gt;&lt;br /&gt;8 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#27_manejar"&gt;Tutorial de Manejo de Código&lt;/a&gt;&lt;br /&gt;    8.1 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#271_inicio"&gt;Iniciar el Proyecto&lt;/a&gt;&lt;br /&gt;    8.2 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#272_genapp"&gt;El Plug-in genapp de Maven&lt;/a&gt;&lt;br /&gt;    8.3 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#273_jdev"&gt;El Plug-in JDeveloper de Maven&lt;/a&gt;&lt;br /&gt;    8.4 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#274_ejcutar"&gt;Ejecutar Maven desde dentro de JDeveloper&lt;/a&gt;&lt;br /&gt;    8.5 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#275_consola"&gt;La Consola Maven&lt;/a&gt;&lt;br /&gt;9 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#28_sumario"&gt;Sumario&lt;/a&gt;&lt;br /&gt;10 .     &lt;a href="http://www.programacion.com/java/articulo/jap_j2eemaster_2/#29_proximos"&gt;Próximos Pasos&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6361027540996491186?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6361027540996491186/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6361027540996491186' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6361027540996491186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6361027540996491186'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/manejar-proyectos-j2ee.html' title='Manejar Proyectos J2EE'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8363029889492498250</id><published>2009-11-26T03:15:00.000+01:00</published><updated>2009-11-26T03:16:22.128+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='svn merge branches'/><title type='text'>Hacer un merge entre dos ramas de SVN</title><content type='html'>&lt;p&gt;No es la primera vez que me enfrento a ello, pero siempre se me olvida cómo se hace y pierdo un montón de tiempo con ello. Así que lo apunto:&lt;/p&gt; &lt;p&gt;El escenario son 2 rama: el trunk y un branch del primero. El branch se creó en el día D, y en la revisión 100 (esto es importante!, mirad el log del svn si no lo sabéis). Hoy, trunk está en la revisión 400. El objetivo es mover todos los desarrollos de la branch a trunk.&lt;/p&gt; &lt;p&gt;1. Lo primero que hay que hacer es sincronizar todos los cambios de branch y trunk, y asegurarse que nadie trabaja en branch&lt;br /&gt;2. Se baja la última versión de trunk, y no se modifica!&lt;br /&gt;3. Se selecciona el proyecto trunk, y se pulsa en Team/Merge…&lt;br /&gt;4. En el campo From se elige el proyecto Trunk en la revisión 100 (cuando se creó el branch!)&lt;br /&gt;5. En el campo To se elige el proyecto Branch, en la HEAD revision&lt;br /&gt;6. Ejecutar un DryRun. Esto simula el merge y así se puede ver si vamos bien o no&lt;br /&gt;7. Ejecutar el Merge&lt;br /&gt;8. Revisar todos los conflictos, los ficheros que se han borrado del trunk (aparecerán como nuevos, con el ? de svn). Borrarlos definitivamente, o no.&lt;/p&gt; &lt;p&gt;Y bueno, ahora volver a hacer un syncronize y un commit a ver que conflictos encontramos&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8363029889492498250?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8363029889492498250/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8363029889492498250' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8363029889492498250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8363029889492498250'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/hacer-un-merge-entre-dos-ramas-de-svn.html' title='Hacer un merge entre dos ramas de SVN'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7335390192497322940</id><published>2009-11-25T15:30:00.003+01:00</published><updated>2009-11-25T15:54:08.289+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere maven deploy jee5'/><title type='text'>deploying JEE5 apps on Websphere</title><content type='html'>&lt;h2&gt;&lt;a href="http://www.jroller.com/peter_pilgrim/entry/battling_with_maven_2_integrating"&gt;Integrating WebSphere EJB Deploy Ant Task with Maven 2 &lt;/a&gt;&lt;/h2&gt;by &lt;a href="http://www.jroller.com/peter_pilgrim/entry/battling_with_maven_2_integrating"&gt;Peter Pilgrim&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Maven 2.0 has a valuable plug-in called &lt;a href="http://maven.apache.org/plugins/maven-ejb-plugin/"&gt;&lt;b&gt;maven-ejb-plugin&lt;/b&gt;&lt;/a&gt;, which creates an EJB-JAR file from a series of classes and resources. Unfortunately maven-ejb-plugin, since it is open source, does not know to build proprietary skeletons and stubs for commercial application server. In other words it does not compile or generate EJB application server specific artifacts. For Websphere this means running a specific EJB compiler. Compare this behaviour directly with the Ant EJB doclet task. How does one intercept the workings of the maven-ejb-plugin such that we can instrument EJB JAR with the Websphere EJB compiler? &lt;br /&gt;&lt;br /&gt;&lt;h3 class="post-title entry-title"&gt;&lt;a href="http://sdudzin.blogspot.com/2007/09/maven-2-and-websphere-automated-build.html"&gt;Maven 2 and WebSphere - automated build and deployment  of J2EE applications&lt;/a&gt;&lt;/h3&gt;muestra los pom.xml COMPLETOS para EJB, WAR, EAR y parent, partiendo del link anterior de &lt;a href="http://www.jroller.com/peter_pilgrim/entry/battling_with_maven_2_integrating"&gt;Peter Pilgrim&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://mojo.codehaus.org/was6-maven-plugin/"&gt;WAS6 maven plugin&lt;/a&gt;&lt;/h2&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold; font-style: italic;"&gt;TODO: probar una aplicación JEE5 simple, sin Seam, desplegarla en WAS7 y correrla&lt;/span&gt;&lt;br /&gt;&lt;p&gt;This plugin can be used to&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Generate EJB stub code &lt;/li&gt;&lt;li&gt;Generate or modify resource descriptor&lt;/li&gt;&lt;li&gt;Deploy EARs to targets (servers and/or clusters)&lt;/li&gt;&lt;li&gt;Start/stop applications&lt;/li&gt;&lt;li&gt;Start/stop targets (servers and/or clusters).&lt;/li&gt;&lt;li&gt;Execute arbitrary scripts controlling WAS environments.&lt;/li&gt;&lt;li&gt;Generate EAR files suitable for deploying into a WebSphere Process Server environment using ServiceDeploy.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h1&gt;&lt;a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0809_vamsi/0809_vamsi.html"&gt;Developing Rich Internet Applications for WebSphere Application Server Community Edition &lt;/a&gt;&lt;/h1&gt;quizás pueda servir de ejemplo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7335390192497322940?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7335390192497322940/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7335390192497322940' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7335390192497322940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7335390192497322940'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/deploying-jee5-apps-on-websphere.html' title='deploying JEE5 apps on Websphere'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3275715195674272286</id><published>2009-11-23T23:23:00.002+01:00</published><updated>2009-11-24T00:52:25.945+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam was7 websphere deploy'/><title type='text'>Seam 2.2.0.GA JEE5 application running on WAS7</title><content type='html'>seam_reference.pdf =&gt; Chapter 40:  Seam on IBM's Websphere AS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;(&lt;span style="font-family: arial; font-weight: bold;"&gt;TODO&lt;/span&gt;: maven2 deploy on WAS7)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3275715195674272286?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3275715195674272286/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3275715195674272286' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3275715195674272286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3275715195674272286'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/11/seam-220ga-jee5-application-running-on.html' title='Seam 2.2.0.GA JEE5 application running on WAS7'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-995492528123281098</id><published>2009-10-28T22:19:00.004+01:00</published><updated>2009-10-28T22:26:57.931+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate persistencia transacciones entitymanager jpa'/><title type='text'>persistencia y transacciones</title><content type='html'>&lt;a href="http://www.jboss.org/ejb3/docs/reference/build/reference/en/html/hibernate.html#d0e314"&gt;http://www.jboss.org/ejb3/docs/reference/build/reference/en/html/hibernate.html#d0e314&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 class="title" style="clear: both;"&gt;5.1. Hibernate Mapping Files&lt;/h2&gt;&lt;p&gt;          Persistent classes that are mapped using Hibernate .hbm.xml files are supported.  The EJB3 Deployer will search          the archive for any &lt;tt class="literal"&gt;.hbm.xml&lt;/tt&gt; files and add them to the definition of the underlying Hibernate SessionFactory.  These          &lt;tt class="literal"&gt;.hbm.xml&lt;/tt&gt; files can be virtually anywhere within the archive under any java package or directory.       &lt;/p&gt;&lt;p&gt;          Class Mappings defined in &lt;tt class="literal"&gt;.hbm.xml&lt;/tt&gt; files can be managed by EntityManagers just as annotated          @Entity beans are.  Also, you are allowed to have relationships between a &lt;tt class="literal"&gt;.hbm.xml&lt;/tt&gt;          mapped class and an EJB3 entity.  So, mixing/matching is allowed.       &lt;/p&gt;&lt;div class="sect1" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title" style="clear: both;"&gt;&lt;a name="d0e314"&gt;&lt;/a&gt;5.2. Injection Hibernate Session and SessionFactory&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;          You can inject a &lt;tt class="literal"&gt;org.hibernate.Session&lt;/tt&gt; and &lt;tt class="literal"&gt;org.hibernate.SessionFactory&lt;/tt&gt;          directly into your EJBs just as you can do with EntityManagers and EntityManagerFactorys.  The behavior of a Session is          just the same as the behavior of an injected EntityManager.  The application server controls the lifecycle of the          Session so that you do not have to open, flush, or close the session.  Extended persistence contexts also work          with injected Hibernate Sessions. &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;pre class="programlisting"&gt;import org.hibernate.Session;&lt;br /&gt;import org.hibernate.SessionFactory;&lt;br /&gt;&lt;br /&gt;@Stateful public class MyStatefulBean ... {&lt;br /&gt; @PersistenceContext(unitName="crm") Session session1;&lt;br /&gt; @PersistenceContext(unitName="crm2", type=EXTENDED) Session extendedpc;&lt;br /&gt; @PersistenceUnit(unitName="crm") SessionFactory factory;&lt;br /&gt;     &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h2 class="title" style="clear: both;"&gt;5.3. Access to org.hibernate.Session&lt;/h2&gt;&lt;p&gt;          You can get access to the current underlying Hibernate Session by typecasting your reference to EntityManager.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;pre class="programlisting"&gt; @PersistenceContext EntityManager entityManager;&lt;br /&gt;     public void someMethod();&lt;br /&gt;     {&lt;br /&gt;       org.jboss.ejb3.entity.HibernateSession hs = (HibernateSession)entityManager;&lt;br /&gt;       org.hibernate.Session session = hs.getHibernateSession();&lt;br /&gt;     }&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h2 class="title" style="clear: both;"&gt;5.4. Access to org.hibernate.Query&lt;/h2&gt;&lt;p&gt;          You can get access to the current underlying Hibernate Query by typecasting your reference to a &lt;tt class="code"&gt;org.hibernate.ejb.QueryImpl&lt;/tt&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;pre class="programlisting"&gt; @PersistenceContext EntityManager entityManager;&lt;br /&gt;     public void someMethod();&lt;br /&gt;     {&lt;br /&gt;       javax.persistence.Query query = entityManager.createQuery(...);&lt;br /&gt;       org.hiberante.ejb.QueryImpl hs = (QueryImpl)query;&lt;br /&gt;       org.hibernate.Query hbQuery = hs.getHibernateQuery();&lt;br /&gt;     }&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-995492528123281098?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/995492528123281098/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=995492528123281098' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/995492528123281098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/995492528123281098'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/persistencia-y-transacciones_5958.html' title='persistencia y transacciones'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7289236941800714890</id><published>2009-10-28T20:52:00.000+01:00</published><updated>2009-10-28T20:53:41.782+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jpa properties'/><title type='text'>programmatic persistence properties in JPA</title><content type='html'>JPA also supports programmatic configuration, with a map of options:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Map myProperties = new HashMap();&lt;br /&gt;myProperties.put("hibernate.hbm2ddl.auto", "create-drop");&lt;br /&gt;EntityManagerFactory emf =&lt;br /&gt; Persistence.createEntityManagerFactory("helloworld", myProperties)&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Custom programmatic properties override any property you’ve set in the persis-&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;tence.xml configuration file. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7289236941800714890?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7289236941800714890/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7289236941800714890' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7289236941800714890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7289236941800714890'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/programmatic-persistence-properties-in.html' title='programmatic persistence properties in JPA'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6617600350651772631</id><published>2009-10-28T20:49:00.001+01:00</published><updated>2009-10-28T20:50:14.788+01:00</updated><title type='text'>persistencia y transacciones</title><content type='html'>otra forma de establecer los boundaries de una transacción en &lt;span style="font-weight: bold; color: rgb(255, 0, 0);font-size:130%;" &gt;JPA&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;package hello;&lt;br /&gt;import java.util.*;&lt;br /&gt;import javax.persistence.*;&lt;br /&gt;public class HelloWorld {&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        // Start EntityManagerFactory&lt;br /&gt;        EntityManagerFactory emf =&lt;br /&gt;               Persistence.createEntityManagerFactory("helloworld");&lt;br /&gt;        // First unit of work&lt;br /&gt;        EntityManager em = emf.createEntityManager();&lt;br /&gt;        EntityTransaction tx = em.getTransaction();&lt;br /&gt;        tx.begin();&lt;br /&gt;        Message message = new Message("Hello World");&lt;br /&gt;        em.persist(message);&lt;br /&gt;        tx.commit();&lt;br /&gt;        em.close();&lt;br /&gt;        // Second unit of work&lt;br /&gt;        EntityManager newEm = emf.createEntityManager();&lt;br /&gt;        EntityTransaction newTx = newEm.getTransaction();&lt;br /&gt;        newTx.begin();&lt;br /&gt;        List messages = newEm&lt;br /&gt;            .createQuery("select m from Message m&lt;br /&gt;        ➥ order by m.text asc")&lt;br /&gt;            .getResultList();&lt;br /&gt;   &lt;br /&gt;        System.out.println( messages.size() + " message(s) found" );&lt;br /&gt;        for (Object m : messages) {&lt;br /&gt;            Message loadedMsg = (Message) m;&lt;br /&gt;            System.out.println(loadedMsg.getText());&lt;br /&gt;        }&lt;br /&gt;        newTx.commit();&lt;br /&gt;        newEm.close();&lt;br /&gt;        // Shutting down the application&lt;br /&gt;        emf.close();&lt;br /&gt;    }&lt;br /&gt;}&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6617600350651772631?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6617600350651772631/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6617600350651772631' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6617600350651772631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6617600350651772631'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/persistencia-y-transacciones_4049.html' title='persistencia y transacciones'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6999487252289991610</id><published>2009-10-28T20:46:00.001+01:00</published><updated>2009-10-28T20:47:41.493+01:00</updated><title type='text'>persistencia y transacciones</title><content type='html'>These are your primary programming interfaces in Java Persistence:&lt;br /&gt;&lt;br /&gt;■ javax.persistence.Persistence—A startup class that provides a static method for the creation of an EntityManagerFactory.&lt;br /&gt;&lt;br /&gt;■ javax.persistence.EntityManagerFactory—The equivalent to a Hibernate  SessionFactory. This runtime object represents a particular persistence unit. It’s thread-safe, is usually handled as a singleton, and provides methods for the creation of EntityManager instances.&lt;br /&gt;&lt;br /&gt;■ javax.persistence.EntityManager—The equivalent to a Hibernate Session. This single-threaded, nonshared object represents a particular unit of work for data access. It provides methods to manage the lifecycle of entity instances and to create Query instances.&lt;br /&gt;&lt;br /&gt;■ javax.persistence.Query—This is the equivalent to a Hibernate Query.&lt;br /&gt;An object is a particular JPA query language or native SQL query representation, and it allows safe binding of parameters and provides various methods for the execution of the query.&lt;br /&gt;&lt;br /&gt;■ &lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;javax.persistence.EntityTransaction—This is the equivalent to a Hibernate Transaction, used in Java SE environments for the demarcation of RESOURCE_LOCAL transactions. In Java EE, you rely on the  standardized javax.transaction.UserTransaction interface of  JTA for programmatic transaction demarcation.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6999487252289991610?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6999487252289991610/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6999487252289991610' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6999487252289991610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6999487252289991610'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/persistencia-y-transacciones_28.html' title='persistencia y transacciones'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-1563870553518194924</id><published>2009-10-28T16:05:00.003+01:00</published><updated>2009-10-28T19:51:00.550+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='persistencia transaccion hibernate'/><title type='text'>persistencia y transacciones</title><content type='html'>otra forma de establecer los boundaries de la transacción:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;package hello;&lt;br /&gt;import java.util.*;&lt;br /&gt;import org.hibernate.*;&lt;br /&gt;import persistence.*;&lt;br /&gt;public class HelloWorld {&lt;br /&gt;   public static void main(String[] args) {&lt;br /&gt;       // First unit of work&lt;br /&gt;       Session session =&lt;br /&gt;           HibernateUtil.getSessionFactory().openSession();&lt;br /&gt;       Transaction tx = session.beginTransaction();&lt;br /&gt;       Message message = new Message("Hello World");&lt;br /&gt;       Long msgId = (Long) session.save(message);&lt;br /&gt;       tx.commit();&lt;br /&gt;       session.close();&lt;br /&gt;       // Second unit of work&lt;br /&gt;       Session newSession =&lt;br /&gt;           HibernateUtil.getSessionFactory().openSession();&lt;br /&gt;       Transaction newTransaction = newSession.beginTransaction();&lt;br /&gt;       List messages =&lt;br /&gt;           newSession.createQuery("from Message m order by&lt;br /&gt;        ➥ m.text asc").list();&lt;br /&gt;       System.out.println( messages.size() +&lt;br /&gt;           " message(s) found:" );&lt;br /&gt;       for ( Iterator iter = messages.iterator();&lt;br /&gt;             iter.hasNext(); ) {&lt;br /&gt;           Message loadedMsg = (Message) iter.next();&lt;br /&gt;           System.out.println( loadedMsg.getText() );&lt;br /&gt;       }&lt;br /&gt;       newTransaction.commit();&lt;br /&gt;       newSession.close();&lt;br /&gt;       // Shutting down the application&lt;br /&gt;       HibernateUtil.shutdown();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;sacado del chapter2.pdf del libro de hibernate (pag.47)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-1563870553518194924?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/1563870553518194924/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=1563870553518194924' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1563870553518194924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1563870553518194924'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/persistencia-y-transacciones.html' title='persistencia y transacciones'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-583635275388933415</id><published>2009-10-28T15:53:00.003+01:00</published><updated>2009-10-28T15:57:07.842+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='test entitymanager jta transaction'/><title type='text'>Test: trucos para acceder a recursos en los test</title><content type='html'>&lt;span style="font-style: italic;"&gt;(sacado del ejemplo de hibernate &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;caveatemptor-jpa-061211&lt;/span&gt;&lt;span style="font-style: italic;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;testsuite-integration-ejb3.xml:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;!-- DBUnit needs a database connection --&amp;gt;&lt;br /&gt;    &amp;lt;parameter name="jndi_datasource" value="java:/caveatemptorTestingDatasource"&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;!-- How do we get an EntityManagerFactory from JNDI in tests? --&amp;gt;&lt;br /&gt;    &amp;lt;parameter name="jndi_name_emf" value="java:/EntityManagerFactories/caveatEmptorEMF"&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;!-- How do we get a JTA UserTransaction from JNDI in tests? --&amp;gt;&lt;br /&gt;    &amp;lt;parameter name="jndi_name_usertx" value="UserTransaction"&amp;gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-583635275388933415?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/583635275388933415/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=583635275388933415' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/583635275388933415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/583635275388933415'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/test-trucos-para-acceder-recursos-en.html' title='Test: trucos para acceder a recursos en los test'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-4985637925311856235</id><published>2009-10-28T15:44:00.003+01:00</published><updated>2009-10-28T15:50:58.969+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate orm persistence'/><title type='text'>HIBERNATE: Para que solamente detecte las anotaciones</title><content type='html'>En el persistence.xml:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&amp;lt;!-- Only scan and detect annotated entities --&amp;gt;&lt;br /&gt;&amp;lt;property name="hibernate.archive.autodetection" value="class"&amp;gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(sacado del ejemplo de hibernate caveatemptor)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-4985637925311856235?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/4985637925311856235/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=4985637925311856235' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4985637925311856235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4985637925311856235'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/hibernate-para-que-solamente-detecte.html' title='HIBERNATE: Para que solamente detecte las anotaciones'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6041184152481074371</id><published>2009-10-18T21:39:00.000+02:00</published><updated>2009-10-18T21:40:50.974+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate cascade'/><title type='text'>Hibernate - Cascade recommendations</title><content type='html'>&lt;p&gt;&lt;a href="http://docs.jboss.org/hibernate/stable/entitymanager/reference/en/html_single/#d0e500"&gt;Recommendations&lt;/a&gt;:&lt;/p&gt;&lt;div class="itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;p&gt;It doesn't usually make sense to enable cascade on a         &lt;tt class="literal"&gt;@ManyToOne&lt;/tt&gt; or &lt;tt class="literal"&gt;@ManyToMany&lt;/tt&gt;         association. Cascade is often useful for &lt;tt class="literal"&gt;@OneToOne&lt;/tt&gt;         and &lt;tt class="literal"&gt;@OneToMany&lt;/tt&gt; associations.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If the child object's lifespan is bounded by the lifespan of the         parent object, make the parent a full lifecycle object by specifying         &lt;tt class="literal"&gt;CascadeType.ALL&lt;/tt&gt; and         &lt;tt class="literal"&gt;org.hibernate.annotations.CascadeType.DELETE_ORPHAN&lt;/tt&gt;         (please refer to the Hibernate reference guide for the semantics of         orphan delete)&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Otherwise, you might not need cascade at all. But if you think         that you will often be working with the parent and children together         in the same transaction, and you want to save yourself some typing,         consider using &lt;tt class="code"&gt;cascade={PERSIST, MERGE}&lt;/tt&gt;. These options         can even make sense for a many-to-many association.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6041184152481074371?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6041184152481074371/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6041184152481074371' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6041184152481074371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6041184152481074371'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/hibernate-cascade-recommendations.html' title='Hibernate - Cascade recommendations'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-5210478755944118044</id><published>2009-10-18T21:12:00.002+02:00</published><updated>2009-10-18T21:16:04.409+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate query hints'/><title type='text'>Hibernate - Query Hints</title><content type='html'>&lt;h4 class="title"&gt;&lt;a href="http://docs.jboss.org/hibernate/stable/entitymanager/reference/en/html_single/#d0e500"&gt;3.4.1.7. Query hints&lt;/a&gt;&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Query hints (for performance optimization, usually) are         implementation specific. Hints are declared using the         &lt;tt class="methodname"&gt;query.setHint(String name, Object value)&lt;/tt&gt;         method, or through the &lt;tt class="literal"&gt;@Named(Native)Query(hints)&lt;/tt&gt;         annotation Note that these are not SQL query hints! The Hibernate EJB3         implementation offers the following query hints:&lt;/p&gt;&lt;div class="table"&gt;&lt;a name="d0e812"&gt;&lt;/a&gt;&lt;p class="title"&gt;&lt;b&gt;Table 3.1. Hibernate query hints&lt;/b&gt;&lt;/p&gt;&lt;table summary="Hibernate query hints" border="1"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;thead&gt;&lt;tr&gt;&lt;th align="center"&gt;Hint&lt;/th&gt;&lt;th align="center"&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="font-weight: bold;"&gt;org.hibernate.timeout&lt;/td&gt;&lt;td&gt;Query timeout in seconds ( eg. new Integer(10)                 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;org.hibernate.fetchSize&lt;/td&gt;&lt;td&gt;Number of rows fetched by the JDBC driver per roundtrip                 ( eg. new Integer(50) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="font-weight: bold;"&gt;org.hibernate.comment&lt;/td&gt;&lt;td&gt;Add a comment to the SQL query, useful for the DBA (                 e.g. new String("fetch all orders in 1 statement") )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;org.hibernate.cacheable&lt;/td&gt;&lt;td&gt;Whether or not a query is cacheable ( eg. new                 Boolean(true) ), defaults to false&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;org.hibernate.cacheMode&lt;/td&gt;&lt;td&gt;Override the cache mode for this query ( eg.                 CacheMode.REFRESH )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;org.hibernate.cacheRegion&lt;/td&gt;&lt;td&gt;Cache region of this query ( eg. new                 String("regionName") )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="font-weight: bold;"&gt;org.hibernate.readOnly&lt;/td&gt;&lt;td&gt;Entities retrieved by this query will be loaded in a                 read-only mode where Hibernate will never dirty-check them or                 make changes persistent ( eg. new Boolean(true) ), default to                 false&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="font-weight: bold; color: rgb(255, 0, 0);"&gt;org.hibernate.flushMode&lt;/td&gt;&lt;td&gt;Flush mode used for this query&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;org.hibernate.cacheMode&lt;/td&gt;&lt;td&gt;Cache mode used for this query&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The value object accept both the native type or its string         equivalent (eg. &lt;tt class="literal"&gt;CaheMode.REFRESH&lt;/tt&gt; or         “&lt;span class="quote"&gt;&lt;tt class="literal"&gt;REFRESH&lt;/tt&gt;&lt;/span&gt;”). Please refer to the         Hibernate reference documentation for more information.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-5210478755944118044?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/5210478755944118044/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=5210478755944118044' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5210478755944118044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5210478755944118044'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/hibernate-query-hints.html' title='Hibernate - Query Hints'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3360532281027755042</id><published>2009-10-09T22:02:00.002+02:00</published><updated>2009-10-09T22:49:31.869+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gripe teresa forcades'/><title type='text'>teresa forcades - confabulación gripe A</title><content type='html'>&lt;a href="http://www.forumlibertas.com/frontend/forumlibertas/noticia.php?id_noticia=14869&amp;amp;id_seccion=8"&gt;&lt;span style="color: rgb(0, 37, 170);font-family:Verdana,Arial,Helvética,sans-serif;font-size:14;"  &gt;&lt;b&gt;&lt;u&gt;El afán de protagonismo de la religiosa Teresa Forcades la lleva a fomentar el alarmismo sobre la Gripe A&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(80, 80, 80);font-size:85%;" &gt;&lt;strong&gt;&lt;a href="http://www.redasociativa.org/elinsurgente/modules.php?name=News&amp;amp;file=article&amp;amp;sid=17769"&gt;Una reflexión y una propuesta en relación a la nueva gripe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;h1&gt;&lt;a href="http://edition.cnn.com/2009/HEALTH/05/04/swine.flu.pandemic/index.html"&gt;When a pandemic isn't a pandemic&lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;&lt;a href="http://www.jean-jacques-crevecoeur.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=100:courriel-21&amp;amp;catid=65:grippe-a-h1n1&amp;amp;Itemid=98"&gt;Extraits du corriel&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3360532281027755042?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3360532281027755042/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3360532281027755042' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3360532281027755042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3360532281027755042'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/10/teresa-forcades-confabulacion-gripe.html' title='teresa forcades - confabulación gripe A'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8393887403827685644</id><published>2009-09-27T12:31:00.005+02:00</published><updated>2009-09-27T15:48:16.414+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam resources properties sql externalizar'/><title type='text'>Deploying custom resources</title><content type='html'>&lt;span style="font-style: italic;font-family:courier new;" &gt;creamos un nuevo action:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;public void action1_(){&lt;br /&gt;ResourceBundle bundle = SeamResourceBundle.getBundle();&lt;br /&gt;String sql = bundle.getString("sql1");&lt;br /&gt;&lt;br /&gt;log.info("sql: " + sql);&lt;br /&gt;statusMessages.add("sql: " + sql);&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;y ponemos el sql.properties en el directorio src/hot:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sql1=select h from Hotel h where h.name like '%#{exampleHotel.name}%'&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;from &lt;a href="http://seamframework.org/Community/IncludingAResourceBundleNotCalledMessages"&gt;http://seamframework.org/Community/IncludingAResourceBundleNotCalledMessages&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;core:resource-loader&amp;gt;&lt;br /&gt;&amp;lt;core:bundle-names&gt;&lt;br /&gt;  &amp;lt;value&amp;gt;mycompany_messages&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/core:bundle-names&amp;gt;&lt;br /&gt;&amp;lt;/core:resource-loader&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;from seam reference 2.1.1-GA.pdf&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;29.10. Deploying custom resources (externalizar SQL's)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Se trata de crear un componente que se cargue en el arranque de la aplicación, y contenga un set de properties con las sql's de la aplicación, y que se pueda desplegar en caliente por si se actualiza el fichero de properties.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8393887403827685644?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8393887403827685644/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8393887403827685644' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8393887403827685644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8393887403827685644'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/09/deploying-custom-resources.html' title='Deploying custom resources'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-4337658976465785894</id><published>2009-09-21T23:52:00.000+02:00</published><updated>2009-09-21T23:54:11.567+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam hibernate jpa session'/><title type='text'>24.2.1. Using the Hibernate API</title><content type='html'>&lt;span style="font-weight: bold;"&gt;24.2.1. Using the Hibernate API&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To use the Hibernate API to manage the database objects, we inject a Hibernate Session in-&lt;br /&gt;stead of an EntityManager into the ManagerPojo class. The API methods in the Hibernate&lt;br /&gt;Session is roughly equivalent to methods in the EntityManager; they have only slightly dif-&lt;br /&gt;ferent method names. This is the Hibernate version of the ManagerPojo class:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;@Name("manager")&lt;br /&gt;@Scope (APPLICATION)&lt;br /&gt;public class ManagerPojo {&lt;br /&gt;@In (required=false) @Out (required=false)&lt;br /&gt;private Person person;&lt;br /&gt;@In (create=true)&lt;br /&gt;private Session helloSession;&lt;br /&gt;Long pid;&lt;br /&gt;@DataModel&lt;br /&gt;private List &lt;person&gt; fans;&lt;br /&gt;@DataModelSelection&lt;br /&gt;private Person selectedFan;&lt;br /&gt;public String sayHello () {&lt;br /&gt;helloSession.save (person);&lt;br /&gt;return "fans";&lt;br /&gt;}&lt;br /&gt;@Factory("fans")&lt;br /&gt;public void findFans () {&lt;br /&gt;fans = helloSession.createQuery(&lt;br /&gt;"select p from Person p")&lt;br /&gt;.list();&lt;br /&gt;}&lt;br /&gt;public void setPid (Long pid) {&lt;br /&gt;this.pid = pid;&lt;br /&gt;if (pid != null) {&lt;br /&gt;person = (Person)&lt;br /&gt;helloSession.get(Person.class, pid);&lt;br /&gt;} else {&lt;br /&gt;person = new Person ();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public Long getPid () {&lt;br /&gt;return pid;&lt;br /&gt;}&lt;br /&gt;public String delete () {&lt;br /&gt;Person toDelete =&lt;br /&gt;(Person) helloSession.merge (selectedFan);&lt;br /&gt;helloSession.delete( toDelete );&lt;br /&gt;findFans ();&lt;br /&gt;return null;&lt;br /&gt;}&lt;br /&gt;public String update () {&lt;br /&gt;return "fans";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-4337658976465785894?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/4337658976465785894/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=4337658976465785894' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4337658976465785894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4337658976465785894'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/09/2421-using-hibernate-api.html' title='24.2.1. Using the Hibernate API'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-140659341581955304</id><published>2009-09-21T23:16:00.001+02:00</published><updated>2009-09-21T23:20:22.961+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam errorMessages'/><title type='text'>Display Error Messages on the Web Form</title><content type='html'>&lt;span style="font-weight: bold;font-size:130%;" &gt;10.4. Display Error Messages on the Web Form&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;s:decorate&gt;&lt;br /&gt;f:facet name="beforeInvalidField"&gt;&lt;br /&gt;h:graphicimage src="anotherError.gif"&gt;&lt;br /&gt;/h:graphicimage&gt;&lt;br /&gt;f:facet name="afterInvalidField"&gt;&lt;br /&gt;s:message styleclass="anotherError"&gt;&lt;br /&gt;/s:message&gt;&lt;br /&gt;f:facet name="aroundInvalidField"&gt;&lt;br /&gt;s:span styleclass="error"&gt;&lt;br /&gt;/s:span&gt;&lt;br /&gt;h:inputtext value="#{person.name}"&gt;&lt;br /&gt;/h:inputtext&gt;/f:facet&gt;/f:facet&gt;/f:facet&gt;/s:decorate&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-140659341581955304?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/140659341581955304/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=140659341581955304' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/140659341581955304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/140659341581955304'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/09/display-error-messages-on-web-form.html' title='Display Error Messages on the Web Form'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6794466933646638757</id><published>2009-09-21T22:37:00.002+02:00</published><updated>2009-09-21T22:55:37.981+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam exceptions'/><title type='text'>exception management in pages.xml</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;14.4., “Use pages.xml for System&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Exceptions”&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;from booking example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;pages.xml&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;exception class="org.jboss.seam.security.NotLoggedInException"&gt;&lt;br /&gt;        &lt;redirect id="/home.xhtml"&gt;&lt;br /&gt;            &lt;message severity="warn"&gt;You must be logged in to use this feature&lt;/message&gt;&lt;br /&gt;        &lt;/redirect&gt;&lt;br /&gt;    &lt;/exception&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;exception class="javax.faces.application.ViewExpiredException"&gt;&lt;br /&gt;        &lt;redirect id="/home.xhtml"&gt;&lt;br /&gt;            &lt;message severity="warn"&gt;Session expired, please log in again&lt;/message&gt;&lt;br /&gt;        &lt;/redirect&gt;&lt;br /&gt;    &lt;/exception&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6794466933646638757?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6794466933646638757/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6794466933646638757' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6794466933646638757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6794466933646638757'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/09/exception-management-in-pagesxml.html' title='exception management in pages.xml'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6586772899646290090</id><published>2009-09-21T21:14:00.003+02:00</published><updated>2009-09-21T21:45:37.499+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exceptios seam'/><title type='text'>Annotate exceptios</title><content type='html'>From the book 'JBoss Seam Simplicity and Power Beyond Java EE':&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;14.3 Annotate Exceptions&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;@ApplicationException(rollback=true)&lt;br /&gt;@Redirect(viewId="/inventoryError.xhtml")&lt;br /&gt;public class InventoryException&lt;br /&gt;extends Exception {&lt;br /&gt;public InventoryException () { }&lt;br /&gt;}&lt;/blockquote&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;14.4. Use pages.xml for System Exceptions&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6586772899646290090?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6586772899646290090/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6586772899646290090' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6586772899646290090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6586772899646290090'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/09/annotate-exceptios.html' title='Annotate exceptios'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3609840743334240365</id><published>2009-09-21T00:55:00.007+02:00</published><updated>2009-09-23T01:08:40.417+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hudson svn hook trac'/><title type='text'>SVN hooks for hudson builds</title><content type='html'>En el directorio hooks del repositorio renombramos/copiamos post-commit.bat (o .exe)&lt;br /&gt;&lt;br /&gt;en el fichero post-commit.bat escribimos:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;python C:\svnrepos\notify_hudson.py&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;escribir este script en un fichero llamado notify_hudson.py:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;import urllib, urllib2, time&lt;br /&gt;&lt;br /&gt;url = 'http://localhost:8080/hudson/job/seam4hudson/build?token=build&amp;amp;cause=svncommit+texto'&lt;br /&gt;&lt;br /&gt;values = {'token' : 'build', #write ur specific key/value pair&lt;br /&gt;        'key2' : 'value2',&lt;br /&gt;        'key3' : 'value3',&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;try:&lt;br /&gt;#    data = urllib.urlencode(values)       &lt;br /&gt;  req = urllib2.Request(url)&lt;br /&gt;  response = urllib2.urlopen(req)&lt;br /&gt;  the_page = response.read()&lt;br /&gt;  print the_page&lt;br /&gt;except Exception, detail:&lt;br /&gt;  print "Err ", detail&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;script sacado de &lt;a href="http://love-python.blogspot.com/2008/04/get-content-html-source-of-url-by-http.html"&gt;http://love-python.blogspot.com/2008/04/get-content-html-source-of-url-by-http.html&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3609840743334240365?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3609840743334240365/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3609840743334240365' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3609840743334240365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3609840743334240365'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/09/svn-hooks-for-hudson-builds.html' title='SVN hooks for hudson builds'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-5818470316731917249</id><published>2009-07-24T23:25:00.001+02:00</published><updated>2009-07-24T23:28:38.454+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maven2 release version plugin'/><title type='text'>maven release version plugin</title><content type='html'>Para modificar las versiones de los pom.xml y sus hijos:&lt;br /&gt;&lt;br /&gt;=======&lt;br /&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/415764/hierarchy-of-maven-projects-without-scattering-the-version-number"&gt;http://stackoverflow.com/questions/415764/hierarchy-of-maven-projects-without-scattering-the-version-number&lt;/a&gt;&lt;br /&gt;I think this approach can be complemented with Maven version plug-in: &lt;a href="http://mojo.codehaus.org/versions-maven-plugin" rel="nofollow"&gt;mojo.codehaus.org/versions-maven-plugin&lt;/a&gt; It can increment the parent.version tag in child projects automatically; see versions:update-child-modules goal. – &lt;a href="http://stackoverflow.com/users/68473/dan" class="comment-user"&gt;Dan&lt;/a&gt; &lt;span class="comment-date"&gt;&lt;span title="2009-05-13 16:38:45Z UTC"&gt;May 13 at 16:38&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;=======&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://mojo.codehaus.org/versions-maven-plugin/"&gt;Versions Maven Plugin&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;=======&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://maven.apache.org/plugins/maven-release-plugin/"&gt;Maven Release Plugin&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;=======&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-5818470316731917249?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/5818470316731917249/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=5818470316731917249' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5818470316731917249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5818470316731917249'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/07/maven-release-version-plugin.html' title='maven release version plugin'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7725202171238455165</id><published>2009-07-09T22:18:00.001+02:00</published><updated>2009-07-10T00:21:45.969+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='taylor plugins'/><title type='text'>Taylor 1.3.0 - Writing Custom Generators</title><content type='html'>&lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators"&gt;&lt;/a&gt;&lt;br /&gt;&lt;h1 class="firstHeading"&gt;         &lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators"&gt;Writing Custom Generators      &lt;/a&gt;&lt;/h1&gt;       &lt;h3 id="siteSub"&gt;         From Taylor      &lt;/h3&gt;                &lt;div id="contentSub"&gt;                   &lt;/div&gt;                         &lt;!-- BEGIN content --&gt;         &lt;p&gt;Taylor MDA comes with a set of code generation templates. But you may want to write your own templates for any number of reasons: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; You want to use a different language: Ruby, PHP, .Net, etc &lt;/li&gt;&lt;li&gt; You want to use a different framework: Seam vs Spring, JSF vs GWT, etc &lt;/li&gt;&lt;li&gt; You simply want the code to generate different &lt;/li&gt;&lt;li&gt; Etc... &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you just want to fix a bug you can override a template: &lt;a href="http://taylor.sourceforge.net/index.php/Customize_Code_Templates" title="Customize Code Templates"&gt;Customize Code Templates&lt;/a&gt; &lt;/p&gt;&lt;p&gt;The following outlines how to create your own code generator plugin. &lt;i&gt;These are sometime called &lt;u&gt;cartridges&lt;/u&gt;.&lt;/i&gt; &lt;/p&gt; &lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;h2&gt;Contents&lt;/h2&gt; &lt;span class="toctoggle"&gt;[&lt;a href="javascript:toggleToc()" class="internal" id="togglelink"&gt;hide&lt;/a&gt;]&lt;/span&gt;&lt;/div&gt; &lt;ul&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators#Plugin_Basics"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;Plugin Basics&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators#Create_Plugin"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;Create Plugin&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators#Create_Template"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Create Template&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators#Register_Template"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt; &lt;span class="toctext"&gt;Register Template&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators#Test_Template"&gt;&lt;span class="tocnumber"&gt;5&lt;/span&gt; &lt;span class="toctext"&gt;Test Template&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators#Profiles"&gt;&lt;span class="tocnumber"&gt;6&lt;/span&gt; &lt;span class="toctext"&gt;Profiles&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Writing_Custom_Generators#Utility_Actions"&gt;&lt;span class="tocnumber"&gt;7&lt;/span&gt; &lt;span class="toctext"&gt;Utility Actions&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;script type="text/javascript"&gt; if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } &lt;/script&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Writing_Custom_Generators&amp;amp;action=edit&amp;amp;section=1" title="Edit section: Plugin Basics"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Plugin_Basics"&gt;&lt;/a&gt;&lt;h1&gt;Plugin Basics&lt;/h1&gt; &lt;p&gt;For starters, code generators are just Eclipse plugins, so here is a good primer:  &lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;a href="http://www.ibm.com/developerworks/library/os-eclipse-plugindev1/" class="external text" title="http://www.ibm.com/developerworks/library/os-eclipse-plugindev1/" rel="nofollow"&gt;Plug-in development 101, Part 1: The fundamentals&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Writing_Custom_Generators&amp;amp;action=edit&amp;amp;section=2" title="Edit section: Create Plugin"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Create_Plugin"&gt;&lt;/a&gt;&lt;h1&gt;Create Plugin&lt;/h1&gt; &lt;ol&gt;&lt;li&gt; Start by creating a basic plugin project. &lt;ol&gt;&lt;li&gt; Copy &lt;a href="https://taylor.svn.sourceforge.net/svnroot/taylor/eclipse/trunk/" class="external text" title="https://taylor.svn.sourceforge.net/svnroot/taylor/eclipse/trunk/" rel="nofollow"&gt;net.taylor.mda.samplegen&lt;/a&gt; to get a jump start. &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; Modify the MANIFEST.MF to match the project name, package and version. &lt;/li&gt;&lt;li&gt; Modify the PLUGIN_ID in the GeneratorPlugin class. &lt;/li&gt;&lt;li&gt; Build the plugin &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Here is the basic layout of a plugin: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; project &lt;ul&gt;&lt;li&gt; src &lt;ul&gt;&lt;li&gt; net.taylor.mda.mygen.GeneratorPlugin &lt;/li&gt;&lt;li&gt; net.taylor.mda.generator.template.* &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; templates &lt;ul&gt;&lt;li&gt; main &lt;ul&gt;&lt;li&gt; java &lt;/li&gt;&lt;li&gt; resources &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; maven &lt;/li&gt;&lt;li&gt; test &lt;ul&gt;&lt;li&gt; java &lt;/li&gt;&lt;li&gt; resources &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; Header.jetinc &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; META-INF &lt;ul&gt;&lt;li&gt; MANIFEST.MF &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; plugin.xml &lt;/li&gt;&lt;li&gt; build.properties &lt;/li&gt;&lt;li&gt; .jetproperties &lt;/li&gt;&lt;li&gt; .classpath &lt;/li&gt;&lt;li&gt; .project &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;NOTE: By convention the template directory mimics the structure of the generated code. For example, src/main/java, src/main/resources, src/test/java, src/test/resources &lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Writing_Custom_Generators&amp;amp;action=edit&amp;amp;section=3" title="Edit section: Create Template"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Create_Template"&gt;&lt;/a&gt;&lt;h1&gt;Create Template&lt;/h1&gt; &lt;p&gt;If you are new to JET, you will want to review and refer back to these tutorials: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;a href="http://www.eclipse.org/articles/Article-JET/jet_tutorial1.html" class="external text" title="http://www.eclipse.org/articles/Article-JET/jet_tutorial1.html" rel="nofollow"&gt;JET Tutorial Part 1 (Introduction to JET)&lt;/a&gt; &lt;/li&gt;&lt;li&gt; &lt;a href="http://www.eclipse.org/articles/Article-JET2/jet_tutorial2.html" class="external text" title="http://www.eclipse.org/articles/Article-JET2/jet_tutorial2.html" rel="nofollow"&gt;JET Tutorial Part 2 (Write Code that Writes Code)&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The sample generator plugin contains a sample template. &lt;/p&gt;&lt;p&gt;Use the JET editor &lt;i&gt;(included with taylor)&lt;/i&gt; to test the sample template &lt;/p&gt; &lt;ul&gt;&lt;li&gt; You will need to register it with *.*jet extensions &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Here are the highlights of a template: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; Name template files with an informational extensions such as: *.javajet, *.xmljet, *.xhtmljet &lt;/li&gt;&lt;li&gt; The first line of the template defines the class name and the imports. &lt;/li&gt;&lt;li&gt; The second line defines the type of UML element that is passed as an argument to the template. &lt;/li&gt;&lt;/ul&gt; &lt;pre&gt;&lt;%@ jet package="net.taylor.mda.generator.template.main.java.sample" class="SampleGen"&lt;br /&gt;imports="org.eclipse.uml2.uml.* java.util.* net.taylor.mda.generator.util.* org.eclipse.emf.codegen.util.*"&lt;br /&gt;%&gt;&lt;br /&gt;&lt;%Model uml2Package = (Model) argument;%&gt;&lt;br /&gt;&lt;/pre&gt; &lt;ul&gt;&lt;li&gt; This code handles formatting imports for java code. Imports are adding implicitly based on the UML model. Framework imports are added explicitly as shown below. &lt;/li&gt;&lt;/ul&gt; &lt;pre&gt;&lt;%ImportManager importManager=null;%&gt;&lt;br /&gt;&lt;%if (NameHelper.getQualifiedName(uml2Package) != null) {%&gt;&lt;br /&gt;&lt;%importManager = ImportHelper.makeImportManager(NameHelper.getQualifiedName(uml2Package));%&gt;&lt;br /&gt;&lt;%} else {%&gt;&lt;br /&gt;&lt;%importManager = ImportHelper.makeImportManager("");%&gt;&lt;br /&gt;&lt;%}%&gt;&lt;br /&gt;&lt;%importManager.addImport("java.io.Serializable");%&gt;&lt;br /&gt;&lt;%importManager.addImport("org.jboss.seam.ScopeType");%&gt;&lt;br /&gt;&lt;%importManager.addImport("org.jboss.seam.annotations.Logger");%&gt;&lt;br /&gt;&lt;%importManager.addImport("org.jboss.seam.annotations.Name");%&gt;&lt;br /&gt;&lt;%importManager.addImport("org.jboss.seam.annotations.Observer");%&gt;&lt;br /&gt;&lt;%importManager.addImport("org.jboss.seam.annotations.Scope");%&gt;&lt;br /&gt;&lt;%importManager.addImport("org.jboss.seam.log.Log");%&gt;&lt;br /&gt;&lt;br /&gt;&lt;%&lt;br /&gt;StringBuffer importStringBuffer = stringBuffer;&lt;br /&gt;int importInsertionPoint = stringBuffer.length();&lt;br /&gt;importManager.addCompilationUnitImports(stringBuffer.toString());&lt;br /&gt;%&gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;%importStringBuffer.insert(importInsertionPoint, importManager.computeSortedImports());%&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;ul&gt;&lt;li&gt; This block shows an example of generating java code. &lt;/li&gt;&lt;li&gt; Various helper classes are available in package net.taylor.mda.generator.util. &lt;/li&gt;&lt;/ul&gt; &lt;pre&gt;&lt;%@ include file="../../Header.jetinc"%&gt;&lt;br /&gt;package &lt;%=NameHelper.getQualifiedName(uml2Package)%&gt;;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* &lt;%=TypeHelper.getDocumentation(uml2Package)%&gt;&lt;br /&gt;*&lt;br /&gt;* @author &lt;%=System.getProperty("user.name")%&gt;&lt;br /&gt;* @generated&lt;br /&gt;*/&lt;br /&gt;@Name("&lt;%=NameHelper.getUncapName(uml2Package)%&gt;Init")&lt;br /&gt;@Scope(ScopeType.APPLICATION)&lt;br /&gt;public class &lt;%=NameHelper.getCapName(uml2Package)%&gt;Init implements Serializable {&lt;br /&gt;&lt;br /&gt; /** @generated */&lt;br /&gt; @Logger&lt;br /&gt; private Log log;&lt;br /&gt;&lt;br /&gt; /** @generated */&lt;br /&gt; @Observer("org.jboss.seam.postInitialization")&lt;br /&gt; public void init() throws Exception {&lt;br /&gt;  log.info("Starting &lt;%=NameHelper.getCapName(uml2Package)%&gt;Init...");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Writing_Custom_Generators&amp;amp;action=edit&amp;amp;section=4" title="Edit section: Register Template"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Register_Template"&gt;&lt;/a&gt;&lt;h1&gt;Register Template&lt;/h1&gt; &lt;p&gt;This is the part that is uniquely Taylor. &lt;/p&gt;&lt;p&gt;Each template is registered in its plugin.xml file using the &lt;b&gt;template&lt;/b&gt; extension point. The engine in the Generator plugin uses these extensions to determine which templates to execute and how to render the menus. &lt;/p&gt; &lt;pre&gt;      &lt;template&lt;br /&gt;            id="EntityClass"&lt;br /&gt;            path="/main/java/entity/EntityClass.javajet"&lt;br /&gt;            outputPattern="/src/main/java/{0}/{1}.java"&lt;br /&gt;            ifExists="merge"&lt;br /&gt;            projectSuffix="jpa"&lt;br /&gt;            hasStereotype="javax.persistence.Entity"&lt;br /&gt;            modelElement="org.eclipse.uml2.uml.internal.impl.ClassImpl"&gt;&lt;br /&gt;     &lt;/template&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;ul&gt;&lt;li&gt; &lt;b&gt;id&lt;/b&gt; - a unique name that will be used to reference this template &lt;/li&gt;&lt;li&gt; &lt;b&gt;path&lt;/b&gt; - the relative location and name of the template &lt;/li&gt;&lt;li&gt; &lt;b&gt;modelElement&lt;/b&gt; - what UML type does the template apply to &lt;/li&gt;&lt;li&gt; &lt;b&gt;hasStereotype&lt;/b&gt; - further restrict matches based on an applied stereotype &lt;/li&gt;&lt;li&gt; &lt;b&gt;outputPattern&lt;/b&gt; - describes the generated file name and path with substitutions &lt;ul&gt;&lt;li&gt; {0} - path based on UML Package &lt;/li&gt;&lt;li&gt; {1} - name of UML element &lt;/li&gt;&lt;li&gt; {2} - name of parent UML element &lt;/li&gt;&lt;li&gt; {3} - fully qualified UML element name with '::' replaced with '-' &lt;/li&gt;&lt;li&gt; {4} - lower case model name with '_' replaced with '.' &lt;/li&gt;&lt;li&gt; {5} - model name with '_' replaced with '.' &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; &lt;b&gt;ifExists&lt;/b&gt; - what to do if the file already exists: merge, skip, backup &lt;/li&gt;&lt;li&gt; &lt;b&gt;projectSuffix&lt;/b&gt; - files are generated in project named &lt;modelname&gt;-&lt;projectsuffix&gt;, a new project is created if it doesn't exist &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;br /&gt;See the existing &lt;a href="https://taylor.svn.sourceforge.net/svnroot/taylor/eclipse/trunk/" class="external text" title="https://taylor.svn.sourceforge.net/svnroot/taylor/eclipse/trunk/" rel="nofollow"&gt;template plugins&lt;/a&gt; as examples. &lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Writing_Custom_Generators&amp;amp;action=edit&amp;amp;section=5" title="Edit section: Test Template"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Test_Template"&gt;&lt;/a&gt;&lt;h1&gt;Test Template&lt;/h1&gt; &lt;p&gt;We already used the JET Editor preview tab to unit test a template. Now we need to test that the template is properly registered. &lt;/p&gt; &lt;ol&gt;&lt;li&gt; &lt;b&gt;Run&lt;/b&gt; the plug-in project as an Eclipse Application from the tool bar. &lt;/li&gt;&lt;li&gt; Create a test model &lt;/li&gt;&lt;li&gt; Test the &lt;b&gt;Generate&lt;/b&gt; menu to verify that you template appears (see &lt;a href="http://taylor.sourceforge.net/index.php/Generate_Code" title="Generate Code"&gt;Generate Code&lt;/a&gt;) &lt;/li&gt;&lt;li&gt; Now Generate and validate the results &lt;/li&gt;&lt;/ol&gt; &lt;ul&gt;&lt;li&gt; You will likely want to install the EMF and UML2 SDKs for debugging.  &lt;/li&gt;&lt;li&gt; The Engine will also log exceptions to the console. &lt;/li&gt;&lt;li&gt; Plugging errors will show up in the Eclipse Error Log view. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;That is basically it! &lt;/p&gt;&lt;p&gt;The following are some optional topics. &lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Writing_Custom_Generators&amp;amp;action=edit&amp;amp;section=6" title="Edit section: Profiles"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Profiles"&gt;&lt;/a&gt;&lt;h1&gt;Profiles&lt;/h1&gt; &lt;p&gt;Taylor comes with many profiles. However, you may want to create your own for a specific framework or specification. &lt;/p&gt;&lt;p&gt;If you are new to UML Profiles, you will want to review and refer back to this tutorial: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;a href="http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Introduction_to_UML2_Profiles/article.html" class="external text" title="http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Introduction_to_UML2_Profiles/article.html" rel="nofollow"&gt;Introduction to UML2 Profiles&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;You can reverse engineer a profile from a jar that contains annotations.  &lt;/p&gt; &lt;ul&gt;&lt;li&gt; File &gt; Import &gt; Taylor &gt; Import Java Annotations to UML Profile &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Package the profile in a plug-in, such as the one with the templates. &lt;/p&gt;&lt;p&gt;Adding the following extensions to the plugin.xml will automatically add the profile to any new models. &lt;/p&gt; &lt;pre&gt;  &lt;extension point="org.eclipse.emf.ecore.uri_mapping"&gt;&lt;br /&gt;   &lt;mapping&lt;br /&gt;      source="pathmap://MY_PROFILES/"&lt;br /&gt;      target="platform:/plugin/my.plugin.profiles/profiles/"&gt;&lt;br /&gt;   &lt;/mapping&gt;&lt;br /&gt; &lt;/extension&gt;&lt;br /&gt;&lt;br /&gt; &lt;extension point="net.taylor.mda.profiles.profiles"&gt;&lt;br /&gt;   &lt;profile&lt;br /&gt;      id="pathmap://MY_PROFILES/my.profile.uml"/&gt;&lt;br /&gt; &lt;/extension&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;See plug-in net.taylor.mda.profiles for examples. &lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Writing_Custom_Generators&amp;amp;action=edit&amp;amp;section=7" title="Edit section: Utility Actions"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Utility_Actions"&gt;&lt;/a&gt;&lt;h1&gt;Utility Actions&lt;/h1&gt; &lt;p&gt;You often need to make mass changes to a model such as spinning through all the elements and adding various stereotypes. This saves time and improves consistency. &lt;/p&gt;&lt;p&gt;This is accomplished using the standard Eclipse action menu mechanism. Package these actions in a plugin along side your templates and profiles. &lt;/p&gt;&lt;p&gt;See the &lt;a href="https://taylor.svn.sourceforge.net/svnroot/taylor/eclipse/trunk/" class="external text" title="https://taylor.svn.sourceforge.net/svnroot/taylor/eclipse/trunk/" rel="nofollow"&gt;net.taylor.mda.jpagen&lt;/a&gt; plug-in for examples. &lt;/p&gt;&lt;p&gt;The following example shows how to register the utilities in a plugin.xml file to be applied to a particular type of UML element. &lt;/p&gt; &lt;pre&gt;   &lt;extension&lt;br /&gt;        point="org.eclipse.ui.navigator.viewer"&gt;&lt;br /&gt;     &lt;viewerActionBinding&lt;br /&gt;           viewerId="net.taylor.mda.ModelNavigator"&gt;&lt;br /&gt;        &lt;includes&gt;&lt;br /&gt;            &lt;actionextension pattern="net.taylor.mda.jpagen.actions.*"&gt;&lt;br /&gt;        &lt;/includes&gt;&lt;br /&gt;     &lt;/vieweractionbinding&gt;&lt;br /&gt;  &lt;/extension&gt;&lt;br /&gt;&lt;br /&gt;  &lt;extension &lt;br /&gt;        point="org.eclipse.ui.navigator.navigatorContent"&gt;&lt;br /&gt;     &lt;actionProvider&lt;br /&gt;               id="net.taylor.mda.jpagen.actions.AddEnumerationAction"&lt;br /&gt;           class="net.taylor.mda.jpagen.actions.AddEnumerationActionExtension"&gt;&lt;br /&gt;       &lt;enablement&gt;&lt;br /&gt;           &lt;or&gt;&lt;br /&gt;                 &lt;adapt type="org.eclipse.uml2.uml.Package"&gt;    &lt;br /&gt;           &lt;/or&gt;&lt;br /&gt;       &lt;/enablement&gt;&lt;br /&gt;     &lt;/actionprovider&gt;&lt;br /&gt;  &lt;/extension&gt;  &lt;br /&gt;&lt;/pre&gt; &lt;ul&gt;&lt;li&gt; See the &lt;a href="http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_navigator_navigatorContent.html" class="external text" title="http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_navigator_navigatorContent.html" rel="nofollow"&gt;Eclipse Documentation&lt;/a&gt; for details. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7725202171238455165?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7725202171238455165/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7725202171238455165' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7725202171238455165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7725202171238455165'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/07/taylor-130-writing-custom-generators.html' title='Taylor 1.3.0 - Writing Custom Generators'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7772131179125078363</id><published>2009-07-09T22:17:00.001+02:00</published><updated>2009-07-09T22:18:54.539+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='taylor plugins'/><title type='text'>Taylor 1.3.0-building the plugins</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Taylor 1.3.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-weight: bold;font-size:180%;" &gt;&lt;a href="http://taylor.sourceforge.net/index.php/Architecture"&gt;&lt;br /&gt;Building the plugins&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Building the Plug-ins&lt;/h2&gt; &lt;ol&gt;&lt;li&gt; Start by creating a dedicated workspace.  &lt;/li&gt;&lt;li&gt; Then checkout the plug-ins from &lt;a href="https://taylor.svn.sourceforge.net/svnroot/taylor/eclipse/trunk/" class="external text" title="https://taylor.svn.sourceforge.net/svnroot/taylor/eclipse/trunk/" rel="nofollow"&gt;SVN&lt;/a&gt;. &lt;/li&gt;&lt;li&gt; To build the plug-ins right-click on the net.taylor.mda project and select Export&gt;Plug-in Development&gt;Deployable features &lt;/li&gt;&lt;li&gt; Specify a Destination Directory, such as C:\workspaces\build, and press Finish &lt;/li&gt;&lt;li&gt; Copy the features and plugins directories from your build directory to your eclipse directory &lt;/li&gt;&lt;li&gt; Restart Eclipse with the -clean option &lt;/li&gt;&lt;/ol&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Architecture&amp;amp;action=edit&amp;amp;section=11" title="Edit section: Testing the Plug-ins"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Testing_the_Plug-ins"&gt;&lt;/a&gt;&lt;h2&gt;Testing the Plug-ins&lt;/h2&gt; &lt;ol&gt;&lt;li&gt; Follow the steps above to checkout the plug-in projects &lt;/li&gt;&lt;li&gt; Select the net.taylor.mda project &lt;/li&gt;&lt;li&gt; Go to Run&gt;Run As&gt;Eclipse Application or Run&gt;Debug As&gt;Eclipse Application &lt;/li&gt;&lt;/ol&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Architecture&amp;amp;action=edit&amp;amp;section=12" title="Edit section: Optional"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Optional"&gt;&lt;/a&gt;&lt;h2&gt;Optional&lt;/h2&gt; &lt;ul&gt;&lt;li&gt; Install the SDKs for GMF and its dependencies for debugging &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7772131179125078363?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7772131179125078363/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7772131179125078363' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7772131179125078363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7772131179125078363'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/07/taylor-130-building-plugins.html' title='Taylor 1.3.0-building the plugins'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-2659639184704215661</id><published>2009-06-01T02:02:00.002+02:00</published><updated>2009-06-01T02:05:51.220+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse seam maven2 structure sources'/><title type='text'>estructura proyecto seam</title><content type='html'>lo mejor para el nuevo proyecto es estructurarlo como los proyectos maven2:&lt;br /&gt;&lt;br /&gt;src-main-java&lt;br /&gt;src-main-resources&lt;br /&gt;src-test-java&lt;br /&gt;src-test-resources&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-2659639184704215661?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/2659639184704215661/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=2659639184704215661' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2659639184704215661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2659639184704215661'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/06/estructura-proyecto-seam.html' title='estructura proyecto seam'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-2657358060881901088</id><published>2009-05-30T23:01:00.000+02:00</published><updated>2009-05-30T23:02:52.755+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tomcat maven plugin'/><title type='text'>maven-tomcat-plugin</title><content type='html'>&lt;a href="http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html"&gt;http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The plugin provides various methods of deployment to Tomcat:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Deploying%20a%20WAR%20file"&gt;Deploying a WAR file&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Deploying%20an%20exploded%20WAR%20directory"&gt;Deploying an exploded WAR directory&lt;/a&gt;, with an optional context.xml file&lt;/li&gt;&lt;li&gt;&lt;a href="http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Deploying%20an%20in-place%20WAR%20directory"&gt;Deploying an in-place WAR directory&lt;/a&gt;, with an optional context.xml file&lt;/li&gt;&lt;li&gt;&lt;a href="http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Deploying%20a%20context.xml%20file"&gt;Deploying a context.xml file&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Running%20a%20WAR%20project"&gt;Running a WAR project&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-2657358060881901088?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/2657358060881901088/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=2657358060881901088' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2657358060881901088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2657358060881901088'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/05/maven-tomcat-plugin.html' title='maven-tomcat-plugin'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-528353022638408070</id><published>2009-05-30T22:10:00.002+02:00</published><updated>2009-05-30T22:12:38.273+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maven2 jboss plugin deploy start'/><title type='text'>maven-jboss-plugin</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aA16ZA_JG8E/SiGS85E_fNI/AAAAAAAAAB8/UEZwNgv4S1Y/s1600-h/maven-jboss-plugin.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 280px;" src="http://2.bp.blogspot.com/_aA16ZA_JG8E/SiGS85E_fNI/AAAAAAAAAB8/UEZwNgv4S1Y/s400/maven-jboss-plugin.JPG" alt="" id="BLOGGER_PHOTO_ID_5341712207849684178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;para hacer el deploy de un proyecto maven en jboss:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mojo.codehaus.org/jboss-maven-plugin/usage.html"&gt;http://mojo.codehaus.org/jboss-maven-plugin/usage.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-528353022638408070?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/528353022638408070/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=528353022638408070' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/528353022638408070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/528353022638408070'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/05/maven-jboss-plugin.html' title='maven-jboss-plugin'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_aA16ZA_JG8E/SiGS85E_fNI/AAAAAAAAAB8/UEZwNgv4S1Y/s72-c/maven-jboss-plugin.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-122812782891478295</id><published>2009-05-23T01:37:00.004+02:00</published><updated>2009-05-23T03:23:45.961+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='taylor eclipse svn'/><title type='text'>importar proyectos taylor a eclipse</title><content type='html'>crear nuevo workspace&lt;br /&gt;&lt;br /&gt;import -&gt; maven projects from scm&lt;br /&gt;&lt;br /&gt;Seleccionar el directorio padre de todos los proyectos (no el master). El plugin buscará todos los pom.xml en los subdiretorios y creará los proyectos&lt;br /&gt;&lt;br /&gt;por ejemplo para el proyecto taylor-tracker-1.2.0:&lt;br /&gt;&lt;br /&gt;http://taylor.svn.sourceforge.net/svnroot/taylor/applications/branches/taylor-tracker-1.2.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-122812782891478295?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/122812782891478295/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=122812782891478295' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/122812782891478295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/122812782891478295'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/05/importar-proyectos-taylor-eclipse.html' title='importar proyectos taylor a eclipse'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8336354457227455909</id><published>2009-05-23T00:18:00.004+02:00</published><updated>2009-05-23T03:30:33.250+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='taylor jpa ddl maven'/><title type='text'>Generar DDL con maven2</title><content type='html'>En el proyecto de taylor-tracker que viene en el fichero taylor-tracker-jboss-bundle-1.2.0.zip, en la carpeta:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;jboss-4.2.0.GA\server\all\deploy\taylor-tracker-app-1.2.0.ear\taylor-tracker-jpa-1.2.0.jar\META-INF\maven\taylor-tracker\taylor-tracker-jpa&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;está el pom.xml del artefacto. En este fichero hay un comentario que nos puede servir para facilitar la generación de la DDL a partir del proyecto jpa generado por el modelo:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;create the &lt;span style="font-weight: bold;"&gt;hbm2ddl.properties&lt;/span&gt; file with your dialect:&lt;br /&gt;                           &lt;span style="font-style: italic;font-family:courier new;" &gt;hibernate.dialect=org.hibernate.dialect.Oracle9Dialect&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;el fichero hay que crearlo en src/test/resources/hbm2ddl.properties&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;generará el fichero en hibernate3/sql/schema.sql&lt;br /&gt;&lt;br /&gt;then run: &lt;span style="font-weight: bold; color: rgb(0, 0, 153);"&gt;mvn hibernate3:hbm2ddl&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8336354457227455909?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8336354457227455909/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8336354457227455909' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8336354457227455909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8336354457227455909'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/05/generar-ddl-con-maven2.html' title='Generar DDL con maven2'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-5526129288893462548</id><published>2009-05-19T22:59:00.001+02:00</published><updated>2009-05-19T23:01:20.572+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='uml 2see'/><title type='text'>another UML tool</title><content type='html'>UML tool&lt;br /&gt;&lt;br /&gt;http://topcased-mm.gforge.enseeiht.fr/website/modeling/uml/index.html&lt;br /&gt;&lt;br /&gt;updatesite:       http://topcased-mm.gforge.enseeiht.fr/release/update-site&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-5526129288893462548?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/5526129288893462548/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=5526129288893462548' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5526129288893462548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5526129288893462548'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/05/another-uml-tool.html' title='another UML tool'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3296207826965700246</id><published>2009-05-19T20:57:00.003+02:00</published><updated>2009-05-19T21:44:49.617+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam reference 2see'/><title type='text'>puntos interesantes en seam_reference-2.1.2.CR1.pdf</title><content type='html'>&lt;div class="sect3" lang="en-US"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a id="d0e23664"&gt;29.1.4.5. Character encoding&lt;/a&gt;&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;a id="d0e23664"&gt; Sets the character encoding of submitted form data. &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="d0e23664"&gt; This filter is not installed by default and requires an entry in                     &lt;code class="literal"&gt;components.xml&lt;/code&gt; to enable it: &lt;/a&gt;&lt;/p&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;!-- XML : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) --&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e23664"&gt;&lt;&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_name"&gt;&lt;a id="d0e23664"&gt;web:character-encoding-filter&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;a id="d0e23664"&gt; &lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_name"&gt;&lt;a id="d0e23664"&gt;encoding&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e23664"&gt;=&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;&lt;a id="d0e23664"&gt;"UTF-16"&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;a id="d0e23664"&gt; &lt;/a&gt;&lt;/span&gt;&lt;a id="d0e23664"&gt;&lt;span class="xml_attribute_name"&gt;override-client&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;=&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;"true"&lt;/span&gt;&lt;span class="xml_plain"&gt; &lt;/span&gt;&lt;span class="xml_attribute_name"&gt;url-pattern&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;=&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;"*.seam"&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;/&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;a id="d0e23664"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;div class="itemizedlist"&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt; &lt;a id="d0e23664"&gt;                            &lt;code class="literal"&gt;encoding&lt;/code&gt; — The encoding to use. &lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt; &lt;a id="d0e23664"&gt;                            &lt;code class="literal"&gt;override-client&lt;/code&gt; — If this is set to &lt;code class="literal"&gt;true&lt;/code&gt;,                             the request encoding will be set to whatever is specified by &lt;code class="literal"&gt;encoding&lt;/code&gt; no                             matter whether the request already specifies an encoding or not. If set to                             &lt;code class="literal"&gt;false&lt;/code&gt;, the request encoding will only be set if the request doesn't                             already specify an encoding. The default setting is &lt;code class="literal"&gt;false&lt;/code&gt;. &lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Transactions&lt;br /&gt;&lt;br /&gt;&lt;a id="d0e23821"&gt;Finally, let's talk about transactions. In an EJB3 environment, we recommend the use of a special                 built-in component for transaction management, that is fully aware of container transactions, and can                 correctly process transaction success events registered with the &lt;code class="literal"&gt;Events&lt;/code&gt; component. If                 you don't add this line to your &lt;code class="literal"&gt;components.xml&lt;/code&gt; file, Seam won't know when                 container-managed transactions end:&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e23821"&gt;&lt;&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_name"&gt;&lt;a id="d0e23821"&gt;transaction:ejb-transaction&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e23821"&gt;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;/span&gt;&lt;a id="d0e23821"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="sect2" lang="en-US"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a id="d0e24119"&gt;29.4.1. Boostrapping Hibernate in Seam&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;a id="d0e24119"&gt; Seam will bootstrap a Hibernate &lt;code class="literal"&gt;SessionFactory&lt;/code&gt; from your                     &lt;code class="literal"&gt;hibernate.cfg.xml&lt;/code&gt; file if you install a built-in component: &lt;/a&gt;&lt;/p&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;!-- XML : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) --&gt;&lt;br /&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24119"&gt;&lt;&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_name"&gt;&lt;a id="d0e24119"&gt;persistence:hibernate-session-factory&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;a id="d0e24119"&gt; &lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_name"&gt;&lt;a id="d0e24119"&gt;name&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24119"&gt;=&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;&lt;a id="d0e24119"&gt;"hibernateSessionFactory"&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24119"&gt;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;/span&gt;&lt;a id="d0e24119"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;p&gt;&lt;a id="d0e24119"&gt; You will also need to configure a &lt;span class="emphasis"&gt;&lt;em&gt;managed session&lt;/em&gt;&lt;/span&gt; if you want a Seam managed                 Hibernate &lt;code class="literal"&gt;Session&lt;/code&gt; to be available via injection. &lt;/a&gt;&lt;/p&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;!-- XML : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) --&gt;&lt;br /&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24119"&gt;&lt;&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_name"&gt;&lt;a id="d0e24119"&gt;persistence:managed-hibernate-session&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;a id="d0e24119"&gt; &lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_name"&gt;&lt;a id="d0e24119"&gt;name&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24119"&gt;=&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;&lt;a id="d0e24119"&gt;"hibernateSession"&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;/span&gt;&lt;a id="d0e24119"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="xml_plain"&gt;                            &lt;/span&gt;&lt;span class="xml_attribute_name"&gt;session-factory&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;=&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;"#{hibernateSessionFactory}"&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;/&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="sect2" lang="en-US"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a id="d0e24142"&gt;29.4.2. Boostrapping JPA in Seam&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;a id="d0e24142"&gt; Seam will bootstrap a JPA &lt;code class="literal"&gt;EntityManagerFactory&lt;/code&gt; from your                 &lt;code class="literal"&gt;persistence.xml&lt;/code&gt; file if you install this built-in component: &lt;/a&gt;&lt;/p&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;!-- XML : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) --&gt;&lt;blockquote&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;br /&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24142"&gt;&lt;&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_name"&gt;&lt;a id="d0e24142"&gt;persistence:entity-manager-factory&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;a id="d0e24142"&gt; &lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_name"&gt;&lt;a id="d0e24142"&gt;name&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24142"&gt;=&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;&lt;a id="d0e24142"&gt;"entityManagerFactory"&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24142"&gt;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;/span&gt;&lt;a id="d0e24142"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;a id="d0e24142"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;p&gt;&lt;a id="d0e24142"&gt; You will also need to configure a &lt;span class="emphasis"&gt;&lt;em&gt;managed persistence context&lt;/em&gt;&lt;/span&gt; if you want a                 Seam managed JPA &lt;code class="literal"&gt;EntityManager&lt;/code&gt; to be available via injection. &lt;/a&gt;&lt;/p&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;!-- XML : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) --&gt;&lt;a id="d0e24142"&gt;&lt;span class="xml_tag_symbols"&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;/span&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;pre xmlns="" rf="java:org.jboss.highlight.XhtmlRendererFactory" class="XML"&gt;&lt;a id="d0e24142"&gt;&lt;br /&gt;&lt;span class="xml_tag_symbols"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a id="d0e24142"&gt;&lt;&lt;/a&gt;&lt;span class="xml_tag_name"&gt;&lt;a id="d0e24142"&gt;persistence:managed-persistence-context&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;a id="d0e24142"&gt; &lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_name"&gt;&lt;a id="d0e24142"&gt;name&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;&lt;a id="d0e24142"&gt;=&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;&lt;a id="d0e24142"&gt;"entityManager"&lt;/a&gt;&lt;/span&gt;&lt;span class="xml_plain"&gt;&lt;/span&gt;&lt;a id="d0e24142"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="xml_plain"&gt;                            &lt;/span&gt;&lt;span class="xml_attribute_name"&gt;entity-manager-factory&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;=&lt;/span&gt;&lt;span class="xml_attribute_value"&gt;"#{entityManagerFactory}"&lt;/span&gt;&lt;span class="xml_tag_symbols"&gt;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3296207826965700246?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3296207826965700246/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3296207826965700246' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3296207826965700246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3296207826965700246'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/05/puntos-interesantes-en-seamreference.html' title='puntos interesantes en seam_reference-2.1.2.CR1.pdf'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8365790317092610059</id><published>2009-04-20T02:15:00.000+02:00</published><updated>2009-04-20T02:17:18.806+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='persistence.xml persistence entities'/><title type='text'>persistence unit</title><content type='html'>&lt;span id="intelliTxt"&gt;&lt;h3&gt;&lt;a href="http://www.onjava.com/pub/a/onjava/2006/05/17/standardizing-with-ejb3-java-persistence-api.html?page=5"&gt;Packaging&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;EJB3 JPA is standardizing POJO persistence. Thus, entities aren't limited to EJB modules; they can be packaged in a Web module, ejb-jar module, library module in the EAR level, or a standard jar file. You can also use entities in Java SE. You must package a descriptor (&lt;em&gt;persistence.xml&lt;/em&gt;), like the following, in the archive that contain entities:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;&lt;persistence&gt;&lt;br /&gt;&lt;persistence-unit name="onjava"&gt;&lt;br /&gt;&lt;provider&gt;oracle.toplink.essentials.PersistenceProvider&lt;/provider&gt;&lt;br /&gt;&lt;jta-data-source&gt;jdbc/OracleDS&lt;/jta-data-source&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/persistence-unit&gt;&lt;br /&gt;&lt;/persistence&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;This descriptor identifies the persistence provider, persistent units, and the data source used by a persistent unit. As the name suggests,&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt; a &lt;/span&gt;&lt;em style="color: rgb(255, 0, 0); font-weight: bold;"&gt;persistent unit&lt;/em&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt; is a collection of entities that are managed together&lt;/span&gt;. If you have a single persistent unit defined in a specific module, you don't have to identify the entity classes in the &lt;em&gt;persistence.xml&lt;/em&gt;; it will be dynamically discovered by the persistence provider.&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8365790317092610059?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8365790317092610059/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8365790317092610059' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8365790317092610059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8365790317092610059'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/persistence-unit.html' title='persistence unit'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-412363083886016430</id><published>2009-04-20T02:07:00.002+02:00</published><updated>2009-04-20T02:10:08.649+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jpa persist transaction entity'/><title type='text'>persist an entity (Serializable) on application-managed entity manager</title><content type='html'>&lt;span id="intelliTxt"&gt;from &lt;/span&gt;&lt;a href="http://www.onjava.com/pub/a/onjava/2006/05/17/standardizing-with-ejb3-java-persistence-api.html?page=4"&gt;&lt;span id="intelliTxt"&gt;&lt;b&gt;Standardizing Java Persistence with the EJB3 Java Persistence API&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;span id="intelliTxt"&gt;&lt;br /&gt;&lt;br /&gt;If you persist an entity, any state changes to associated entities will be persisted as well if &lt;code&gt;CascadeType&lt;/code&gt; for the relationship is set to &lt;code&gt;PERSIST&lt;/code&gt; or &lt;code&gt;ALL&lt;/code&gt;. Unless you're using an extended persistent context, the entities will become detached after the end of the transaction. The merge operation lets you merge a detached entity instance with the persistent context; the state of a detached entity will be synchronized with the database. This helps you get rid of the Data Transfer Object (DTO) anti-pattern prevalent in EJB 2.x because entities, being POJOs, can be transferred between tiers. The only requirement is that the entity class must implement the &lt;code&gt;java.io.Serializable&lt;/code&gt; interface.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-412363083886016430?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/412363083886016430/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=412363083886016430' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/412363083886016430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/412363083886016430'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/persist-entity-serializable-on.html' title='persist an entity (Serializable) on application-managed entity manager'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6531967626049190209</id><published>2009-04-20T01:27:00.001+02:00</published><updated>2009-04-20T01:28:48.780+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='taylor validation expressions hibernate'/><title type='text'>Extending the Hibernate Validation Framework for Complex Rules</title><content type='html'>&lt;h2 class="post-title"&gt;&lt;a href="http://jroller.com/page/$entry.website.user.userName/?anchor=extending_the_hibernate_validation_framework" rel="bookmark" title="Permanent Link: Extending the Hibernate Validation Framework for Complex Rules"&gt;Extending the Hibernate Validation Framework for Complex Rules&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;a href="http://jroller.com/page/$entry.website.user.userName/?anchor=extending_the_hibernate_validation_framework"&gt;go&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Hibernate Validation Framework leverages annotations to define data validation rules on entity beans. Out of the box it comes with many useful annotations for defining simple validation rules such as, NotNull, Min, Max, etc... However, for complex rules that involve multiple properties you will have to write your own validators. This posting shows two approaches to make this easier by using expression language and custom code fragments.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Simple Validations&lt;/h3&gt;&lt;br /&gt;Here is an example of a simple validation. The annotation on the amount property is scoped just to that property. Thus only simple rules can be defined.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;@Entity&lt;br /&gt;public class Loan {&lt;br /&gt;      @NotNull(message="The Amount must be provided.")&lt;br /&gt;      private Double amount;&lt;br /&gt;      ...&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;Complex Validation&lt;/h3&gt;&lt;br /&gt;Here is an example of a complex validation. The annotation on the class is scoped to the whole class. Thus complex rules can be defined that involve any property in the class.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;@Entity&lt;br /&gt;@StartDateBeforeEndDate(message="The start date must be before the end date.")&lt;br /&gt;public class Loan {&lt;br /&gt;      private Date startDate;&lt;br /&gt;      private Date endDate;&lt;br /&gt;      ...&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;These features pretty much cover all the various validation requirements. However, defining complex validation rules requires writing both a custom&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;annotation and a custom validator for each rule, which can become very cumbersome. Here are two ways around this issue.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &lt;h3&gt;Expression Language Validator&lt;/h3&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;By using expression language we can write a generic validator that can be reused for various rules. The generic Expression annotation is used to define the rule.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;div style="margin-left: 40px;"&gt;&lt;span style="font-weight: normal;"&gt;@Entity&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;@&lt;span style="font-weight: bold;"&gt;Expression&lt;/span&gt;(value="&lt;span style="font-weight: bold;"&gt;value.startDate &lt;&gt;", message="The start date must be before the end date.")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt; public class Loan {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;      private Date startDate;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;      private Date endDate;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;       ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;The ExpressionValidator class uses the &lt;/span&gt;&lt;/span&gt;&lt;a href="http://jakarta.apache.org/commons/jexl/" target="_blank"&gt;commons-jexl&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt; library to evaluate the expression. The &lt;span style="font-style: italic;"&gt;value &lt;/span&gt;variable in the expression equals the instance of the object being validated. In this case &lt;span style="font-style: italic;"&gt;value &lt;/span&gt;is a loan.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;div style="margin-left: 40px;"&gt;public class ExpressionValidator implements Validator&lt;expression&gt; {&lt;br /&gt;    private String expression;&lt;br /&gt;    public void initialize(Expression expression) {&lt;br /&gt;        this.expression = expression.value();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public boolean isValid(Object value) {&lt;br /&gt;            org.apache.commons.jexl.Expression e = ExpressionFactory.createExpression(expression);&lt;br /&gt;            JexlContext jc = JexlHelper.createContext();&lt;br /&gt;            jc.getVars().put("&lt;span style="font-weight: bold;"&gt;value&lt;/span&gt;", value);&lt;br /&gt;            return (Boolean) e.&lt;span style="font-weight: bold;"&gt;evaluate&lt;/span&gt;(jc);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;h3&gt;Custom Assertion Validator&lt;/h3&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;There are times when you will just have to write custom validation code. But instead of writing a custom annotation and validator class it would be nice to encapsulate the rules in the same class for which the rules apply. This generic Assertion annotation and IAssertion interface do the trick.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt; &lt;div style="margin-left: 40px;"&gt;&lt;span style="font-weight: normal;"&gt;@Entity&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;@&lt;span style="font-weight: bold;"&gt;Assertion&lt;/span&gt;(value=&lt;span style="font-weight: bold;"&gt;Loan.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;StartDateBeforeEndDate&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Assertion.class&lt;/span&gt;, message="The start date must be before the end date.")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt; public class Loan {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;      private Date startDate;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;      private Date endDate;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;       ...&lt;/span&gt;&lt;br /&gt;      &lt;span style="font-weight: normal;"&gt;public static class StartDateBeforeEndDate&lt;span style="font-weight: normal;"&gt;Assertion &lt;/span&gt;implements &lt;span style="font-weight: bold;"&gt;IAssertion &lt;/span&gt;&lt;br /&gt;      {&lt;br /&gt;            public boolean &lt;span style="font-weight: bold;"&gt;isValid&lt;/span&gt;(Object value) {&lt;br /&gt;                Loan loan = (Loan) value;&lt;br /&gt;                return &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;loan.getStartDate()&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;.before(&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;loan.getEndDate()&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;);&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;&lt;span style="font-weight: normal;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;The AssertionValidator class will create an instance of the IAssertion and execute it against the object being validated.&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;div style="margin-left: 40px;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;public class AssertionValidator implements Validator&lt;assertion&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: normal;"&gt;    private IAssertion assertion;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;    public void initialize(Assertion assertion) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: normal;"&gt;            this.assertion = (IAssertion) assertion.value().&lt;span style="font-weight: bold;"&gt;newInstance&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: normal;"&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;    public boolean isValid(Object value) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;        return assertion.&lt;span style="font-weight: bold;"&gt;isValid&lt;/span&gt;(value);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Hopefully the expression appoach will satisfy all your needs and you wont need this custom code approach. For example, you could add an &lt;span style="font-style: italic;"&gt;isStartDateBeforeEndDate() &lt;/span&gt;method to your entity and call it in a simple expression as show below. But the custom code approach is here just in case.&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;div style="margin-left: 40px;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;@Entity&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;@&lt;span style="font-weight: bold;"&gt;Expression&lt;/span&gt;(value="&lt;span style="font-weight: bold;"&gt;value.startDateBeforeEndDate&lt;/span&gt;", message="The start date must be before the end date.")&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt; public class Loan {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;      ...&lt;br /&gt;      public boolean &lt;span style="font-weight: bold;"&gt;isStartDateBeforeEndDate&lt;/span&gt;() {&lt;br /&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;return startDate.before(endDate);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;      }&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt; &lt;h3&gt;Multiple Rules&lt;/h3&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;There is still another piece to this puzzle. We need to be able to apply multiple expressions or assertions. To do this we need a container annotation.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;@Entity&lt;br /&gt;@&lt;span style="font-weight: bold;"&gt;Expressions &lt;/span&gt;({&lt;br /&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;@Expression(&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;value="&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;value.startDate &lt;&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;", message="..."),&lt;br /&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;@Expression(&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;value="...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;", message="...")&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;})&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;public class Loan {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;      private Date startDate;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;      private Date endDate;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;       ...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Note that this capability relies on a requested Hibernate enhancement. You can vote for this enhancement here: &lt;a href="http://opensource.atlassian.com/projects/hibernate/browse/ANN-513?page=all" target="_blank"&gt;JIRA Issue ANN-513&lt;/a&gt;&lt;a href="http://opensource.atlassian.com/projects/hibernate/browse/ANN-513?page=all" target="_blank"&gt;. Or you can apply the patch yourself.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;h3&gt;Resources&lt;/h3&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.hibernate.org/hib_docs/annotations/reference/en/html/validator.html" target="_blank"&gt;Hibernate Validation Framework&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Taylor Validation&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a target="_blank" href="http://taylor.cvs.sourceforge.net/taylor/taylor/commons/src/main/java/net/taylor/validator/"&gt;Code&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target="_blank" href="http://taylor.cvs.sourceforge.net/taylor/taylor/commons/src/test/java/net/taylor/validator/"&gt;Examples&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;a href="http://jakarta.apache.org/commons/jexl/" target="_blank"&gt;Commons Jexl&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6531967626049190209?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6531967626049190209/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6531967626049190209' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6531967626049190209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6531967626049190209'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/extending-hibernate-validation.html' title='Extending the Hibernate Validation Framework for Complex Rules'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3007614726774373049</id><published>2009-04-20T00:55:00.000+02:00</published><updated>2009-04-20T00:58:12.872+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='taylor agile development environment'/><title type='text'>An Agile Development Environment</title><content type='html'>&lt;h2 class="post-title"&gt;&lt;a href="http://jroller.com/jgilbert01/" rel="bookmark" title="Permanent Link: An Agile Development Environment"&gt;An Agile Development Environment&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;All agile methodologies preach delivering working software early and continuously. To achieve this an automated development environment is beneficial. It is also important to get a new project up and running quickly. To this end here is a suggested development environment made up of open source tools along with instructions for getting up and running.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Server Machine&lt;br /&gt;&lt;/h3&gt; &lt;ul&gt;&lt;li&gt;Use your perfered operationing system: Linux, Windows, etc. These instructions will be some what specific to Windows.&lt;/li&gt;&lt;li&gt;Two gigs of RAM, a dual processor, and a fast harddrive are the minimum recommendations.&lt;/li&gt;&lt;li&gt;Install Java 5 or higher: http://java.sun.com/javase/downloads/index_jdk5.jsp&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;Source Control Management&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;The first thing you will need on your development server is version control. SVN is the tool of choice!&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://svn1clicksetup.tigris.org/" target="_blank"&gt;SVN 1 Click Setup&lt;/a&gt; is a great utility to install SVN and TortoiseSVN on windows.&lt;/li&gt;&lt;/ul&gt;Next you want to install Apache HTTP Server to access SVN remotely.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://httpd.apache.org/download.cgi" target="_blank"&gt;Apache HTTP Server Download&lt;/a&gt;&lt;/li&gt;&lt;li&gt;This SVN chapter shows how to point Apache to your SVN repository: &lt;a href="http://svnbook.red-bean.com/en/1.0/ch06s04.html" target="_blank"&gt;Chapter 6. Server Configuration&lt;/a&gt;. The basics are modify your httpd.conf file to&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;uncomment the DAV modules&lt;/li&gt;&lt;li&gt;add &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;div style="margin-left: 120px;"&gt;LoadModule dav_svn_module modules/mod_dav_svn.so&lt;/div&gt; &lt;ul&gt;&lt;ul&gt;&lt;li&gt;map the location&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;div style="margin-left: 120px;"&gt;&lt;location&gt;&lt;br /&gt;    DAV svn&lt;br /&gt;    SVNPath c:/svnrepos&lt;br /&gt;&lt;/location&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;On the client machines you will need &lt;a href="http://subclipse.tigris.org/" target="_blank"&gt;Subclipse&lt;/a&gt; and &lt;a href="http://tortoisesvn.tigris.org/" target="_blank"&gt;TortoiseSVN.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Continuously Integration Build System&lt;/h3&gt;&lt;br /&gt;Now we need to install &lt;span style="font-weight: bold;"&gt;Maven &lt;/span&gt;and create your own corporate maven repository.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download &lt;a href="http://maven.apache.org/download.html" target="_blank"&gt;Maven&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Unzip to a desired location&lt;/li&gt;&lt;li&gt;Add the bin directory to your system path&lt;/li&gt;&lt;li&gt;Add the following to your httpd.conf file&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div style="margin-left: 80px;"&gt;Alias /maven2/ c:/WINDOWS/system32/config/systemprofile/.m2/repository/&lt;br /&gt;Alias /maven2 c:/WINDOWS/system32/config/systemprofile/.m2/repository&lt;br /&gt;&lt;directory&gt;&lt;br /&gt;        Options Indexes&lt;br /&gt;        AllowOverride All&lt;br /&gt;        Order allow,deny&lt;br /&gt;        Allow from all&lt;br /&gt;&lt;/directory&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Next we need to install and configure &lt;span style="font-weight: bold;"&gt;Continuum&lt;/span&gt; to automate your builds.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download &lt;a href="http://maven.apache.org/continuum/download.html" target="_blank"&gt;Continuum&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Unzip to a desired location&lt;/li&gt;&lt;li&gt;Add the following to your httpd.conf file&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div style="margin-left: 80px;"&gt;ProxyPass /continuum http://localhost:8091/continuum/&lt;br /&gt;ProxyPassReverse /continuum http://localhost:8091/continuum/&lt;br /&gt;&lt;br /&gt;Alias /working-directory/ c:/continuum/working-directory/&lt;br /&gt;Alias /working-directory c:/continuum/working-directory/&lt;br /&gt;&lt;directory&gt;&lt;br /&gt;        Options Indexes&lt;br /&gt;        AllowOverride All&lt;br /&gt;        Order allow,deny&lt;br /&gt;        Allow from all&lt;br /&gt;&lt;/directory&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Note that you will need to add the &lt;scm&gt; and &lt;cimanagement&gt; sections to all of your pom.xml files.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Database&lt;/h3&gt;&lt;br /&gt;For running junit tests the &lt;span style="font-weight: bold;"&gt;Hypersonic &lt;/span&gt;in memory database is excellent. It can be downloaded automatically by maven. To demo your applications to your customers &lt;span style="font-weight: bold;"&gt;MySQL &lt;/span&gt;is a great choice.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a target="_blank" href="http://dev.mysql.com/downloads/mysql/4.1.html"&gt;Download&lt;/a&gt; and run&lt;/li&gt;&lt;ul&gt;&lt;li&gt;mysql-essential-4.1.21-win32.msi&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;mysql-gui-tools-5.0-r3-win32.msi&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;a target="_blank" href="http://dev.mysql.com/downloads/connector/j/3.1.html"&gt;Download&lt;/a&gt; and place in your app servers lib directory&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;mysql-connector-java-3.1.13.zip&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;h3&gt;&lt;br /&gt;&lt;/h3&gt; &lt;h3&gt;Application Server&lt;/h3&gt;&lt;br /&gt;To get up and running fast with &lt;span style="font-weight: bold;"&gt;JBoss AS + Portal&lt;/span&gt; you can start with the &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=144396" target="_blank"&gt;Taylor Tracker Bundle&lt;/a&gt;. It is preconfigured with various JBoss components. Just unzip it to the desired location. You will want at least two servers configured: QA and PM. The &lt;span style="font-weight: bold;"&gt;QA &lt;/span&gt;server will be used for running all your automated test cases and for demonstration to your customer. The &lt;span style="font-weight: bold;"&gt;PM&lt;/span&gt; server will run various  project management and collaboration software like Taylor Tracker, &lt;a target="_blank" href="http://labs.jboss.com/portal/jbosswiki"&gt;JBoss Wiki&lt;/a&gt;, and &lt;a target="_blank" href="http://labs.jboss.com/portal/jbossportal/download/index.html"&gt;JBoss Forum&lt;/a&gt;, etc.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Client Tools&lt;/h3&gt;&lt;br /&gt;On the client side us Eclipse. More information is available on the &lt;a target="_blank" href="http://taylor.sourceforge.net/index.php/Installation"&gt;Taylor Installation&lt;/a&gt; page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That is pretty much it! It is also a good idea to ghost this configuration so that you can stamp out new servers as needed. And don't forget to setup a backup schedule for the SVN repository and the MySQL database.&lt;br /&gt;&lt;br /&gt;              &lt;!-- &lt;p class="post-info"&gt;     &lt;?php wp_link_pages(); ?&gt;     &lt;/p&gt;--&gt;     &lt;!--     &lt;?php trackback_rdf(); ?&gt;     --&gt;     &lt;div class="post-footer"&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3007614726774373049?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3007614726774373049/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3007614726774373049' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3007614726774373049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3007614726774373049'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/agile-development-environment.html' title='An Agile Development Environment'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-2537166379983461958</id><published>2009-04-19T23:19:00.003+02:00</published><updated>2009-04-20T00:14:34.123+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='taylor model management'/><title type='text'>Taylor - Model Management</title><content type='html'>&lt;h1 class="firstHeading"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Model_Management"&gt;Model Management      &lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="contentSub"&gt;                   &lt;/div&gt;                         &lt;!-- BEGIN content --&gt;         &lt;p&gt;In any real world application you will need to manage the size of your models so that multiple people can work on the project at the same time. This is often referred to as Team support. &lt;/p&gt; &lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;h2&gt;Contents&lt;/h2&gt; &lt;span class="toctoggle"&gt;[&lt;a href="javascript:toggleToc()" class="internal" id="togglelink"&gt;hide&lt;/a&gt;]&lt;/span&gt;&lt;/div&gt; &lt;ul&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Model_Management#SCM"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;SCM&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Model_Management#Architecture"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;Architecture&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-1"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Model_Management#Tool_Support"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Tool Support&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class="toclevel-2"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Model_Management#Resource_Linking"&gt;&lt;span class="tocnumber"&gt;3.1&lt;/span&gt; &lt;span class="toctext"&gt;Resource Linking&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-2"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Model_Management#Diagram_Shortcuts"&gt;&lt;span class="tocnumber"&gt;3.2&lt;/span&gt; &lt;span class="toctext"&gt;Diagram Shortcuts&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="toclevel-2"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Model_Management#Controlling_Packages"&gt;&lt;span class="tocnumber"&gt;3.3&lt;/span&gt; &lt;span class="toctext"&gt;Controlling Packages&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;script type="text/javascript"&gt; if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } &lt;/script&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Model_Management&amp;amp;action=edit&amp;amp;section=1" title="Edit section: SCM"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="SCM"&gt;&lt;/a&gt;&lt;h2&gt;SCM&lt;/h2&gt; &lt;p&gt;The obvious solution is to use a Source Control Management (SCM) system such as CVS or &lt;b&gt;Subversion&lt;/b&gt;. Taylor model files are just XMI files, so they are ready for scm. And Eclipse provides the scm infrastructure needed for checkin, checkout, diff, merge, etc... &lt;/p&gt;&lt;p&gt;But, scm is not enough. &lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Model_Management&amp;amp;action=edit&amp;amp;section=2" title="Edit section: Architecture"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Architecture"&gt;&lt;/a&gt;&lt;h2&gt;Architecture&lt;/h2&gt; &lt;p&gt;We are really talking about an architecture problem. Not the architecture of the tool, but the architecture of your project. Is it one big jumble or is it decomposed into reasonable systems and subsystems and components and so forth. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Model_Management&amp;amp;action=edit&amp;amp;section=3" title="Edit section: Tool Support"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Tool_Support"&gt;&lt;/a&gt;&lt;h2&gt;Tool Support&lt;/h2&gt; &lt;p&gt;Taylor leverages all of the features provided by EMF and GMF. &lt;/p&gt;&lt;p&gt;There are 2 basic options: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; Use multiple models and link them together &lt;ul&gt;&lt;li&gt; &lt;i&gt;See Resource Linking and Diagram Shortcuts&lt;/i&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; Divide one model into separate files by package &lt;ul&gt;&lt;li&gt; &lt;i&gt;See Controlling Packages&lt;/i&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;You will probably use some combination of both. &lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Model_Management&amp;amp;action=edit&amp;amp;section=4" title="Edit section: Resource Linking"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Resource_Linking"&gt;&lt;/a&gt;&lt;h3&gt;Resource Linking&lt;/h3&gt; &lt;ul&gt;&lt;li&gt; Right click anywhere in the Navigator and select Load Resource... &lt;/li&gt;&lt;li&gt; Browse the workspace for a model &lt;/li&gt;&lt;li&gt; Then you should be able to access the elements in the linked model from various property editors &lt;/li&gt;&lt;/ul&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Model_Management&amp;amp;action=edit&amp;amp;section=5" title="Edit section: Diagram Shortcuts"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Diagram_Shortcuts"&gt;&lt;/a&gt;&lt;h3&gt;Diagram Shortcuts&lt;/h3&gt; &lt;ul&gt;&lt;li&gt; &lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Right click in a diagram and select Create Shortcut... &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt; Browse to an element you want to display in the diagram &lt;/li&gt;&lt;/ul&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Model_Management&amp;amp;action=edit&amp;amp;section=6" title="Edit section: Controlling Packages"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Controlling_Packages"&gt;&lt;/a&gt;&lt;h3&gt;Controlling Packages&lt;/h3&gt; &lt;ul&gt;&lt;li&gt; Right click any package in the Navigator and select Control... &lt;/li&gt;&lt;li&gt; Select Browse Workspace and select a folder to create the new file &lt;/li&gt;&lt;li&gt; Name the file similar to the package name and give it a .uml extension &lt;/li&gt;&lt;li&gt; Then right click on the navigator and select Save to create the new file &lt;/li&gt;&lt;li&gt; A little green icon decoration will show that the package is controlled &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-2537166379983461958?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/2537166379983461958/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=2537166379983461958' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2537166379983461958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2537166379983461958'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/taylor-model-management.html' title='Taylor - Model Management'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7030675879868660095</id><published>2009-04-19T22:38:00.009+02:00</published><updated>2009-04-19T23:19:12.983+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Taylor'/><title type='text'>Taylor</title><content type='html'>&lt;h2&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Generate_Code"&gt;Classpath&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Now lets setup the classpath before browsing the code. &lt;/p&gt;&lt;p&gt;Open the Eclipse preferences and add a M2_REPO classpath variable that points to your Maven repository [${user.home}/.m2/repository] &lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;i&gt;Or use maven: mvn -Declipse.workspace=&lt;path-to-eclipse-workspace&gt; eclipse:add-maven-repo&lt;/i&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;br /&gt;Open a command window, navigate to your &lt;b&gt;master&lt;/b&gt; project directory, and run 'mvn install' and then 'mvn eclipse:eclipse' to generate the .project and .classpath files for all of the projects. &lt;/p&gt;&lt;p&gt;&lt;i&gt;NOTE: If this is the first time you are running this it will take a while to download all the necessary jars. You may have to repeat it several times. It will also fail when it reaches the web project, but that is OK, we will come back to that later.&lt;/i&gt; &lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;i&gt;If you want to use WTP with the web project then use mvn eclipse:eclipse -Dwtpversion=1.5 in the web and pdf project directories&lt;/i&gt; &lt;/li&gt;&lt;li&gt; &lt;a href="http://taylor.sourceforge.net/index.php/JSF_Support" title="JSF Support"&gt;JSF Support&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;br /&gt;Now, go back to Eclipse and switch to the Java perspective. Then select all the projects and press F5 to refresh. &lt;/p&gt;&lt;p&gt;Now browse the code to see what was generated. The high-lights are discussed below.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h1 class="firstHeading"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Create_an_Entity_Diagrams"&gt;Enumerations&lt;/a&gt;&lt;/h1&gt;Also give creating an Enumeration a try. And add some Literals. Then create a status property on the entity bean with a type of Status.&lt;br /&gt;&lt;p&gt;Now lets run some helper utilities to make some bulk changes to the model. Right-click on the net.taylor.tutorial.entity package and select Utilities &gt; JPA and then run: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; Add Temporal Stereotypes and &lt;/li&gt;&lt;li style="font-style: italic; font-weight: bold;"&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Add Enumeration Stereotypes &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h1 class="firstHeading"&gt;         J&lt;a href="http://taylor.sourceforge.net/index.php/JSF_Support"&gt;SF Support&lt;/a&gt;      &lt;/h1&gt;                       &lt;div id="contentSub"&gt;                   &lt;/div&gt;                         &lt;!-- BEGIN content --&gt;         &lt;p&gt;This will probably be fixed in a future version of the eclipse plugin. &lt;/p&gt;&lt;p&gt;Add the following to .settings/org.eclipse.wst.common.project.facet.core.xml &lt;/p&gt; &lt;pre&gt;  &lt;installed facet="jst.jsf" version="1.1"&gt;&lt;h1 class="firstHeading"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Types_to_Java_and_JSF_Mapping"&gt;Types to Java and JSF Mapping      &lt;/a&gt;&lt;/h1&gt;&lt;i&gt;NOTE: Change the type of the description property to types.Text so that a Text Area will be generated in the facelet.&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;div id="contentSub"&gt;                   &lt;/div&gt;                         &lt;!-- BEGIN content --&gt;           &lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt; String &lt;/td&gt;&lt;td&gt; String &lt;/td&gt;&lt;td&gt; JSF Input Text &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Text &lt;/td&gt;&lt;td&gt; String &lt;/td&gt;&lt;td&gt; Text Area - TinyMCE Editor &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Date &lt;/td&gt;&lt;td&gt; Date &lt;/td&gt;&lt;td&gt; Seam Date Picker &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Boolean &lt;/td&gt;&lt;td&gt; Boolean &lt;/td&gt;&lt;td&gt; JSF Check Box &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Integer &lt;/td&gt;&lt;td&gt; Long &lt;/td&gt;&lt;td&gt; RichFaces Spinner &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Decimal &lt;/td&gt;&lt;td&gt; Double &lt;/td&gt;&lt;td&gt; JSF Decimal &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Currency &lt;/td&gt;&lt;td&gt; BigDecimal &lt;/td&gt;&lt;td&gt; JSF Currency &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Percentage &lt;/td&gt;&lt;td&gt; Double &lt;/td&gt;&lt;td&gt; JSF Percentage &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Byte[] &lt;/td&gt;&lt;td&gt; byte[] &lt;/td&gt;&lt;td&gt; Seam File Upload &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Image &lt;/td&gt;&lt;td&gt; String &lt;/td&gt;&lt;td&gt; JSF Image &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Link &lt;/td&gt;&lt;td&gt; String &lt;/td&gt;&lt;td&gt; JSF Link &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Enumeration &lt;/td&gt;&lt;td&gt; your Enum &lt;/td&gt;&lt;td&gt; JSF SelectOne &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Many to One Association &lt;/td&gt;&lt;td&gt; your Class &lt;/td&gt;&lt;td&gt; JSF SelectOne &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Double &lt;/td&gt;&lt;td&gt; Double &lt;/td&gt;&lt;td&gt; deprecated - use Decimal, Currency, or Percentage &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Long &lt;/td&gt;&lt;td&gt; Long &lt;/td&gt;&lt;td&gt; deprecated - use Integer &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Utilities_Menu"&gt;JPA Utilities&lt;/a&gt;&lt;/h2&gt; &lt;ul&gt;&lt;li&gt; Cleanup Associations &lt;ul&gt;&lt;li&gt; For each association, default the mappedBy and cascade properties &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; Add Embedded Stereotypes &lt;/li&gt;&lt;li&gt; Add Temporal Stereotypes &lt;ul&gt;&lt;li&gt; For each property of type Date, Time, or Timestamp add the stereotype and set the value accordingly. &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; Add Enumeration Stereotypes &lt;ul&gt;&lt;li&gt; For each property with an Enumeration type add the stereotype and set the value to STRING &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; Add Index Stereotype to ManyToOne Properties &lt;/li&gt;&lt;li&gt; Add Join Table Stereotypes &lt;/li&gt;&lt;li&gt; Switch Inheritance Types &lt;/li&gt;&lt;li&gt; Switch Id Generators &lt;/li&gt;&lt;li&gt; Add Table Stereotypes &lt;/li&gt;&lt;li&gt; Add Column Stereotypes &lt;/li&gt;&lt;li&gt; Add Attribute Override Stereotypes &lt;/li&gt;&lt;/ul&gt;&lt;h1 class="firstHeading"&gt;         &lt;/h1&gt;&lt;h1 class="firstHeading"&gt;&lt;br /&gt;&lt;/h1&gt;&lt;h1 class="firstHeading"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Unit_Tests"&gt;Unit Tests      &lt;/a&gt;&lt;/h1&gt;       &lt;h3 id="siteSub"&gt;         From Taylor      &lt;/h3&gt;                &lt;div id="contentSub"&gt;                   &lt;/div&gt;                         &lt;!-- BEGIN content --&gt;         &lt;p&gt;Three types of JUnit tests are generated: Service, Seam, and JasperReports.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;Seam&lt;/h2&gt; &lt;p&gt;A Seam junit test is generated in the Ejb3 project for each entity. These tests verify that the Finder and Editor SFSBs and the Facelets expressions (EL) are working properly. &lt;/p&gt; &lt;ul&gt;&lt;li&gt; You might need to tweak the default values for properties. &lt;/li&gt;&lt;li&gt; Association tests are also not generated. &lt;/li&gt;&lt;/ul&gt; &lt;h2&gt;Possible Compilation Errors&lt;/h2&gt; &lt;p&gt;After generating the code and setting up the classpath you may notice that some of the code might have compile errors. This could happen for several reasons: &lt;/p&gt; &lt;ol&gt;&lt;li&gt;Something might be missing from the model. Fix the model and regenerate. &lt;/li&gt;&lt;li&gt;Various TreeNode and EditorBean methods assume there is a property called 'name' that is used for display. Change these to the property you would like to display. &lt;ol&gt;&lt;li&gt;For example, in the tutorial the Ticket entity has a 'title' property instead of a 'name' property. &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;You added an Interceptor from a third party that needs to be added to the Maven pom.xml dependencies section. Or you added an Interceptor that you need to implement. &lt;/li&gt;&lt;li&gt;The session bean operations need to be implemented because they did not match one of the default implementations: save, get, delete, query. &lt;/li&gt;&lt;li&gt;You defined a operation named query that does not match the default signature. See below. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;This is the default signature for operations named query. You will want to define more specialized query operations for the service, but using this signature is a good way to get a prototype up and running quickly. So, either change the model or implement the query as you see fit. Another good option is to use the NamedQuery stereotype to define your queries. It is a good practice to name these the same as the operation that will use them. &lt;/p&gt; &lt;pre&gt; &lt;blockquote&gt;public List&lt;someentity&gt; query(SomeEntity example, Long first, Long max, String orderBy) {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/someentity&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/installed&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h1&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Modify_Code"&gt;Facelets Customization&lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;&lt;p&gt;The generated facelets are meant to be customized. Generating an&lt;br /&gt;Entity bean is very straight forward because there are well defined&lt;br /&gt;rules and only so many variations. On the other hand, the user&lt;br /&gt;interface is the place where different applications can differentiate&lt;br /&gt;themselves.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To this end, the generated facelets are meant to give you a jump start. The following sections outline possible modifications.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Modify_Code&amp;amp;action=edit&amp;amp;section=6" title="Edit section: Editor"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Editor"&gt;&lt;/a&gt;&lt;h2&gt;Editor&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;For the most part the UI can be customized by making changes to the EditorBeans.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Implement isEditable()&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Change the various isRendered methods&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Implement isRendered(String name) and isDisabled(String name) to control individual fields&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Modify Many2One and Many2Many association methods to change&lt;br /&gt;what fields are displayed and add filters. See TODO tags placed in the&lt;br /&gt;code.&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Change createInstance() to initialize properties.&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Add additional actions like submit() and schedule(). Examples have been generated.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Modify_Code&amp;amp;action=edit&amp;amp;section=7" title="Edit section: Finder"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Finder"&gt;&lt;/a&gt;&lt;h2&gt;Finder&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; getSearchFields()&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Add Chart methods&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Modify_Code&amp;amp;action=edit&amp;amp;section=8" title="Edit section: Menus"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Menus"&gt;&lt;/a&gt;&lt;h2&gt;Menus&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;The default-object.xml file defines how pages will be displayed in&lt;br /&gt;JBoss Portal. You will probably want to add and remove pages from this&lt;br /&gt;file. Alternatively, you can do this online in JBoss Portal.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can also create additional *-object.xml files.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Modify_Code&amp;amp;action=edit&amp;amp;section=9" title="Edit section: UI Facelets"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="UI_Facelets"&gt;&lt;/a&gt;&lt;h2&gt;UI Facelets&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;This is were you might make the most changes, such as rearranging fields, changing input types, and adding buttons.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The Facelets use the standard Portlet CSS Styles, so you can accomplish a lot by changing the Portal Theme.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Facelets &lt;b&gt;templates and tags&lt;/b&gt; are leveraged also. When the&lt;br /&gt;Web project is built for the first time the Taylor-Tags library will be&lt;br /&gt;expanded into your project. You can then change the following files to&lt;br /&gt;make global changes across your application:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; webapp/web-inf/jsf/templates&lt;br /&gt;&lt;/li&gt;&lt;li&gt; webapp/web-inf/jsf/tags&lt;br /&gt;&lt;/li&gt;&lt;li&gt; webapp/web-inf/pdf/templates&lt;br /&gt;&lt;/li&gt;&lt;li&gt; webapp/web-inf/pdf/tags&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Modify_Code&amp;amp;action=edit&amp;amp;section=10" title="Edit section: Report Facelets"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Report_Facelets"&gt;&lt;/a&gt;&lt;h2&gt;Report Facelets&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;The generated Seam PDF files are just Facelets so the same things apply as for the UI facelets.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Run_JUnit_Tests"&gt;Seam Tests&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Taylor Commons contains a port of the Seam TestNG libraries to JUnit. Seam junit tests are generated for each Entity in the model to test the generated CRUD Editor and FInder classes. You will need to tweak the default values for some fields like dates and enumerations.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;Version Control&lt;/h2&gt; &lt;p&gt;Check in the model, diagrams, and generated code and descriptors into your version control system. I typically generate the code, then tweak it enough to compile, and then check it in. Then I do any major modifications and check that in before iterating again through the model and regenerating.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h1 class="firstHeading"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Package_and_Deploy"&gt;Package and Deploy &lt;/a&gt;     &lt;/h1&gt;&lt;br /&gt;&lt;h2&gt;Setup&lt;/h2&gt; &lt;ul&gt;&lt;li&gt; Download and unzip &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=144396" class="external text" title="http://sourceforge.net/project/showfiles.php?group_id=144396" rel="nofollow"&gt;Taylor Tracker 1.1.0 JBoss Bundle&lt;/a&gt;. This contains JBoss with all the necessary components configured, such as EJB3 and JBoss Portal. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Copy the necessary configuration files generated in your Ear project's jboss\deploy directory to the server\all\deploy directory. &lt;ul&gt;&lt;li&gt; For example, to setup a datasource copy tutorial-hsqldb-ds.xml &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Setup the JBOSS_HOME system property to point to your JBoss installation &lt;ul&gt;&lt;li&gt; SET JBOSS_HOME=C:\jboss-4.2.0.GA &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Package_and_Deploy&amp;amp;action=edit&amp;amp;section=3" title="Edit section: Build"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Build"&gt;&lt;/a&gt;&lt;h2&gt;Build&lt;/h2&gt; &lt;ul&gt;&lt;li&gt; Change directories to your &lt;b&gt;master&lt;/b&gt; project run &lt;b&gt;mvn clean install&lt;/b&gt; to clean, compile, test, package, and install all the sub-projects: jpa, ejb, web, pdf, app, doc, etc. &lt;/li&gt;&lt;/ul&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Package_and_Deploy&amp;amp;action=edit&amp;amp;section=4" title="Edit section: Deploy"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Deploy"&gt;&lt;/a&gt;&lt;h2&gt;Deploy&lt;/h2&gt; &lt;ul&gt;&lt;li&gt; The App project's pom.xml has the logic to copy the Ear file to your JBoss server. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Alternatively, you can still use the &lt;a href="http://taylor.sourceforge.net/index.php/Jboss-maven-plugin" title="Jboss-maven-plugin"&gt;jboss-maven-plugin&lt;/a&gt; &lt;ul&gt;&lt;li&gt; Run &lt;b&gt;mvn clean install jboss:harddeploy&lt;/b&gt; to deploy your Ear to JBoss. &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Package_and_Deploy&amp;amp;action=edit&amp;amp;section=5" title="Edit section: Packaging"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Packaging"&gt;&lt;/a&gt;&lt;h2&gt;Packaging&lt;/h2&gt; &lt;ul&gt;&lt;li&gt; Run &lt;b&gt;mvn site&lt;/b&gt; to generate the project website with javadoc, xref, and test reports. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Run &lt;b&gt;mvn assembly:assembly&lt;/b&gt; to package everything into zip and tar files.  &lt;ul&gt;&lt;li&gt; Make these &lt;a href="http://taylor.sourceforge.net/index.php/Modifications" title="Modifications"&gt;modifications&lt;/a&gt; to support this. &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Package_and_Deploy&amp;amp;action=edit&amp;amp;section=6" title="Edit section: Other Useful Maven Plugins"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Other_Useful_Maven_Plugins"&gt;&lt;/a&gt;&lt;h2&gt;Other Useful Maven Plugins&lt;/h2&gt; &lt;p&gt;The templates could be changed to generate some of these: &lt;/p&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Package_and_Deploy&amp;amp;action=edit&amp;amp;section=7" title="Edit section: Reports"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Reports"&gt;&lt;/a&gt;&lt;h3&gt;Reports&lt;/h3&gt; &lt;ul&gt;&lt;li&gt; &lt;a href="http://maven.apache.org/plugins/maven-pmd-plugin/" class="external free" title="http://maven.apache.org/plugins/maven-pmd-plugin/" rel="nofollow"&gt;http://maven.apache.org/plugins/maven-pmd-plugin/&lt;/a&gt; &lt;/li&gt;&lt;li&gt; &lt;a href="http://maven.apache.org/plugins/maven-changelog-plugin/" class="external free" title="http://maven.apache.org/plugins/maven-changelog-plugin/" rel="nofollow"&gt;http://maven.apache.org/plugins/maven-changelog-plugin/&lt;/a&gt; &lt;/li&gt;&lt;li&gt; &lt;a href="http://maven.apache.org/plugins/maven-changes-plugin/" class="external free" title="http://maven.apache.org/plugins/maven-changes-plugin/" rel="nofollow"&gt;http://maven.apache.org/plugins/maven-changes-plugin/&lt;/a&gt; &lt;/li&gt;&lt;li&gt; &lt;a href="http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven_p.html" class="external text" title="http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven_p.html" rel="nofollow"&gt;Maven Site Gen Tutorial&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;div class="editsection" style="float: right; margin-left: 5px;"&gt;[&lt;a href="http://taylor.sourceforge.net/index.php?title=Package_and_Deploy&amp;amp;action=edit&amp;amp;section=8" title="Edit section: Packaging"&gt;edit&lt;/a&gt;]&lt;/div&gt;&lt;a name="Packaging_2"&gt;&lt;/a&gt;&lt;h3&gt;Packaging&lt;/h3&gt; &lt;ul&gt;&lt;li&gt; &lt;a href="http://maven.apache.org/plugins/maven-assembly-plugin/" class="external free" title="http://maven.apache.org/plugins/maven-assembly-plugin/" rel="nofollow"&gt;http://maven.apache.org/plugins/maven-assembly-plugin/&lt;/a&gt; &lt;/li&gt;&lt;li&gt; &lt;a href="http://maven.apache.org/plugins/maven-deploy-plugin/" class="external free" title="http://maven.apache.org/plugins/maven-deploy-plugin/" rel="nofollow"&gt;http://maven.apache.org/plugins/maven-deploy-plugin/&lt;/a&gt; &lt;/li&gt;&lt;li&gt; &lt;a href="http://maven.apache.org/plugins/maven-release-plugin/" class="external free" title="http://maven.apache.org/plugins/maven-release-plugin/" rel="nofollow"&gt;http://maven.apache.org/plugins/maven-release-plugin/&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h1 class="firstHeading"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Customize_Code_Templates"&gt;Customize Code Templates&lt;/a&gt;      &lt;/h1&gt;&lt;br /&gt;&lt;p&gt;Templates can be overridden by placing a new version in the directory you specify under Window/Preferences/Taylor. This is useful for overriding the copy right Header template or for fixing template bugs. The templates are found in plug-ins such as net.taylor.mda.ejb3gen. &lt;/p&gt;&lt;p&gt;I typically do the following: &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Create a templates folder next to the model folder. &lt;/li&gt;&lt;li&gt; Set the preferences to point to this folder. &lt;/li&gt;&lt;li&gt; Create a &lt;a href="http://taylor.sourceforge.net/index.php?title=Header.jetinc&amp;amp;action=edit" class="new" title="Header.jetinc"&gt;Header.jetinc&lt;/a&gt; file in this folder. &lt;/li&gt;&lt;li&gt; Check in the custom template so everyone else has access. &lt;/li&gt;&lt;li&gt; As the project progresses we will put additional customized templates here as well. &lt;i&gt;NOTE: The path has to match the path specified in the particular plugin.xml file so that the engine finds them.&lt;/i&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;h2&gt;Custom Plugins&lt;/h2&gt; &lt;p&gt;Additional templates can be added by placing them in your own plugin and adding the following extension point to its plugin.xml. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;extension point="net.taylor.mda.generator.templates"&gt;&lt;br /&gt; &lt;template id="Enum" path="/main/java/entity/Enumeration.javajet" templateclassname="net.taylor.mda.generator.template.main.java.entity.Enum" outputpattern="/src/main/java/{0}/{1}.java" ifexists="merge" modelelement="org.eclipse.uml2.uml.internal.impl.EnumerationImpl"&gt;&lt;br /&gt; &lt;/template&gt;&lt;br /&gt;&lt;/extension&gt;&lt;br /&gt;&lt;/pre&gt;     &lt;p&gt;Additional information can be found under &lt;a href="http://taylor.sourceforge.net/index.php/Architecture" title="Architecture"&gt;Architecture&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;A good JET Template Editor can be found at &lt;a href="http://www.eclipse.org/emft/projects/jeteditor/" class="external free" title="http://www.eclipse.org/emft/projects/jeteditor/" rel="nofollow"&gt;http://www.eclipse.org/emft/projects/jeteditor/&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7030675879868660095?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7030675879868660095/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7030675879868660095' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7030675879868660095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7030675879868660095'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/taylor.html' title='Taylor'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-2506819041369241900</id><published>2009-04-19T22:31:00.004+02:00</published><updated>2009-04-19T22:38:09.326+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ejb3 annotations'/><title type='text'>Anotaciones EJB3</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(35, 0, 220);font-family:Arial,sans-serif;" &gt;&lt;b&gt;Anotaciones  en EJB 3.0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=AnotacionesEJB3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(35, 35, 220);font-family:Arial,sans-serif;font-size:130%;"  &gt;&lt;b&gt; &lt;a name="API_de_Persistencia:_EntityManager"&gt;API de Persistencia: EntityManager&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                                &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt; Primero veremos algunas partes importantes de la API, como la interfaz EntityManager. Esta interfaz es en la que se apoya la API de persistencia y la que se encarga del mapeo entre una tabla relacional y su objeto Java. Funcionalmente es similar a la clase Session de Hibernate o a PersistenceManager de JDO. Proporciona mé;todos para manejar la persistencia de un Bean de Entidad, permite &lt;span style="background-color: rgb(255, 255, 255);"&gt;añadir, eliminar, actualizar y consultar&lt;/span&gt; así como manejar su ciclo de vida. Sus métodos má;s importantes son:&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;          &lt;ul&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;  &lt;small&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;persist(Object entity)&lt;/span&gt;  - almacena el objeto   &lt;span style="font-style: italic;"&gt;entity&lt;/span&gt; en la base de datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li style="color: rgb(255, 102, 102);"&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;merge(T entity)  &lt;/span&gt; &lt;/span&gt;- actualiza las modificaciones en la entidad devolviendo la lista resultante.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-weight: bold; font-style: italic;"&gt;remove(Object entity)  &lt;/span&gt;- elima la entidad.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic; font-weight: bold;"&gt;find(&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Class&lt;t&gt; entity, Object primaryKey)&lt;/t&gt;&lt;/span&gt; - busca la entidad a través de su clave primaria.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li style="color: rgb(255, 0, 0);"&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;span style="font-size:130%;"&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:11;"  &gt;  &lt;span style="font-style: italic; font-weight: bold;"&gt;flush()&lt;/span&gt; - sincroniza las entidades con el contenido de la base de datos.&lt;/span&gt;&lt;/span&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic; font-weight: bold;"&gt;refresh(Object entity)&lt;/span&gt; - refresca el estado de la entidad con su contenido en la base de datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic; font-weight: bold;"&gt;createQuery(String query)&lt;/span&gt; - Crea una query utilizando el lenguaje JPQL.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic; font-weight: bold;"&gt;createNativeQuery()&lt;/span&gt; - Crea una query utilizando el lenguaje SQL.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic; font-weight: bold;"&gt;isOpen()&lt;/span&gt; - Comprueba si está; abierto el EntityManager.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 1px;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic; font-weight: bold;"&gt;close()&lt;/span&gt; - Cierra el EntityManager.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt; &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;           &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;Podemos obtener una referencia al EntityManager a través de la anotación &lt;span style="font-family:Courier New,Courier,monospace;"&gt;@PersistenceContext&lt;/span&gt;. El contenedor de EJB nos proporciona el contexto de persistencia mediante inyección por lo que no tendremos que preocuparnos de su creación y destrucción.&lt;br /&gt;     &lt;br /&gt;        &lt;b&gt;         &lt;span style="font-family:Courier New,Courier,monospace;"&gt;@PersistenceContext&lt;/span&gt;&lt;br /&gt;         &lt;/b&gt;         &lt;span style="font-family:Courier New,Courier,monospace;"&gt;&lt;b&gt;EntityManager entityManager;&lt;/b&gt;&lt;br /&gt;       &lt;/span&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt; &lt;/p&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;Otra forma de obtener un EntityManager es a través de la factoría  &lt;span style="font-family:Courier New,Courier,monospace;"&gt;EntityManagerFactory&lt;/span&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;  &lt;small&gt;con el nombre del contexto de persistencia configurado en el &lt;span style="font-style: italic;"&gt;persistence.xml&lt;/span&gt; .&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;       &lt;br /&gt;        &lt;b&gt;         &lt;small&gt;&lt;span style="font-family:Courier New,Courier,monospace;"&gt;EntityManagerFactory emf = Persistence.createEntityManagerFactory("TestPersistence&lt;/span&gt;&lt;/small&gt;&lt;/b&gt;&lt;small&gt;&lt;b&gt;&lt;span style="font-family:Courier New,Courier,monospace;"&gt;");&lt;/span&gt;&lt;br /&gt;         &lt;/b&gt;         &lt;span style="font-family:Courier New,Courier,monospace;"&gt;&lt;b&gt;EntityManager em = emf.createEntityManager();&lt;/b&gt;&lt;br /&gt;     &lt;br /&gt;       &lt;/span&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;En el método createEntityManagerFactory de la clase Persistence se debe pasar el nombre del contexto definido en el &lt;span style="font-style: italic;"&gt;persistence.xml&lt;/span&gt; .&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;&lt;small&gt; &lt;span style="color: rgb(35, 35, 220);font-family:Arial,sans-serif;font-size:100%;"  &gt;&lt;small&gt;&lt;b&gt; &lt;span style="font-size:130%;"&gt;&lt;a name="Ciclo_de_vida_de_una_Entidad"&gt;Ciclo de vida de una Entidad&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;          &lt;p align="justify"&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:smaller;"  &gt;E&lt;/span&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;ngloba dos aspectos: la relación entre el objeto Entidad y su contexto a persistir y por otro lado la sincronización de su estado con la base de datos. Para realizar estas operaciones la Entidad puede encontrarse en cualquiera de estos cuatro estados:&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;          &lt;ul&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic; font-weight: 700;"&gt;new&lt;/span&gt; - Nueva instancia de la Entidad en memoria sin que aún le sea asignado su contexto persistente almacenado en la tabla de la base de datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic;"&gt;&lt;b&gt;managed&lt;/b&gt;  &lt;/span&gt;- La Entidad dispone de contenido asociado con el de la tabla de la base de datos debido a que se utilizó el método   &lt;span style="font-style: italic;"&gt;persist&lt;/span&gt;(). Los cambios que se produzcan en la Entidad se podrá;n sincronizar con los de la base de datos llamando al método   &lt;span style="font-style: italic;"&gt;flush&lt;/span&gt;().&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic;"&gt;&lt;b&gt;detached&lt;/b&gt; &lt;/span&gt;- La Entidad se ha quedado sin su contenido persistente. &lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Es necesario utilizar el método   &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;merge&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;() para actualizarla.&lt;/span&gt;&lt;/span&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;  &lt;span style="font-style: italic;"&gt;&lt;b&gt;removed&lt;/b&gt; &lt;/span&gt;- Estado después de llamarse al método   &lt;span style="font-style: italic;"&gt;remove&lt;/span&gt;() y el contenido de la Entidad será; eliminado de la base de datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p style="margin-bottom: 0cm; font-style: normal;" align="justify"&gt;&lt;small&gt; &lt;span style="color: rgb(35, 35, 220);font-family:Arial,sans-serif;font-size:100%;"  &gt;&lt;b&gt; &lt;a name="Anotaciones_de_un_Bean_de_Entidad"&gt;Anotaciones de un Bean de Entidad&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;b&gt;@Entity&lt;/b&gt;:&lt;/span&gt; Indica que es un Bean de Entidad.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;ul style="margin-left: 40px;"&gt;&lt;li&gt;  &lt;p align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt; &lt;span style="font-style: italic;"&gt;name &lt;/span&gt;- por defecto el nombre de la clase pero se puede especificar otra diferente.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;               &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;                 &lt;p style="margin-bottom: 0cm; color: rgb(35, 35, 220);" align="justify"&gt; &lt;span style="font-family:Arial,sans-serif;"&gt;&lt;b&gt; &lt;a name="Métodos_del_ciclo_de_vida_de_una_Entidad"&gt;Métodos del ciclo de vida de una Entidad&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;               &lt;p style="color: rgb(0, 153, 0);" align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;span style="font-family:Courier New,monospace;"&gt;@EntityListeners:&lt;/span&gt;&lt;/b&gt; Se pueden definir clases oyentes (&lt;i&gt;listeners&lt;/i&gt;) con métodos de ciclo de vida de una entidad. Para hacer referencia a un &lt;i&gt;listener&lt;/i&gt; se debe incluir esta anotación seguido entre paréntesis de la clase: &lt;span style="font-family:Courier New,monospace;"&gt;@Entity Listeners(MyListener.class)&lt;/span&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt;&lt;span style="font-size:85%;"&gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@ExcludeSuperclassListeners:&lt;/span&gt;&lt;span style="font-family:Arial,sans-serif;"&gt; Indica que ningún &lt;i&gt;listener&lt;/i&gt; de la superclase será; invocado por la entidad ni por ninguna de sus subclases.&lt;/span&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@ExcludeDefaultListeners:&lt;/span&gt; Indica que ningún &lt;i&gt;listener&lt;/i&gt; por defecto será; invocado por esta clase ni por ninguna de sus subclases.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PrePersist:&lt;/span&gt; El método se llamará; justo antes de la persistencia del objeto. Podría ser necesario para asignarle la clave primaria a la entidad a persistir en base de datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PostPersist:&lt;/span&gt; El método se llamará; después de la persistencia del objeto.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt;&lt;span style="font-size:85%;"&gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PreRemove:&lt;/span&gt;&lt;span style="font-family:Arial,sans-serif;"&gt; El método se llamará; antes de que la &lt;/span&gt;&lt;/small&gt;&lt;/span&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;entidad&lt;/small&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;small&gt;&lt;span style="font-family:Arial,sans-serif;"&gt; sea eliminada. &lt;/span&gt;&lt;/small&gt;&lt;/span&gt; &lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PostRemove:&lt;/span&gt; El método se llamará; después de eliminar la entidad de la base de datos. &lt;/small&gt;&lt;/span&gt; &lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PreUpdate:&lt;/span&gt; El método se llamará; antes de que una entidad sea actualizada en base de datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PostUpdate:&lt;/span&gt; El método se llamará; después de que la entidad sea actualizada.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PostLoad:&lt;/span&gt; El método se llamará; después de que los campos de la entidad sean cargados con los valores de su entidad correspondiente de la base de datos. Se suele utilizar para inicializar valores no persistidos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);font-family:Courier New,monospace;font-size:130%;"  &gt;@FlushMode:&lt;/span&gt; Modo en que se ejecuta la transacción: FlushModeType.AUTO (por defecto) y FlushModeType.COMMIT.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@NamedQuery:&lt;/span&gt; Especifica el nombre del objeto query utilizado junto a &lt;span style="font-style: italic;"&gt;EntityManager&lt;/span&gt;.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;ul style="margin-left: 40px;"&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt; &lt;span style="font-style: italic;"&gt;name&lt;/span&gt; - nombre del objeto query.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;query &lt;/span&gt;- especifica la query a la base de datos mediante lenguaje &lt;span style="font-style: italic;"&gt;Java Persistence Query Language&lt;/span&gt; (&lt;a target="_blank" href="http://java.sun.com/javaee/5/docs/tutorial/doc/QueryLanguage.html"&gt;JPQL&lt;/a&gt;)&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;               &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@NamedQueries:&lt;/span&gt; Especifica varias queries como la anterior.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@NamedNativeQuery:&lt;/span&gt; Especifica el nombre de una query SQL normal.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;ul style="margin-left: 40px;"&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt; &lt;span style="font-style: italic;"&gt;name&lt;/span&gt; - nombre del objeto query.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;query &lt;/span&gt;- especifica la query a la base de datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;resultClass&lt;/span&gt; - clase del objeto resultado de la ejecución de la query.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;resultSetMapping&lt;/span&gt; - nombre del &lt;span style="font-style: italic;"&gt;SQLResultSetMapping&lt;/span&gt; definido (se explica má;s abajo).&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;               &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@NamedNaviteQueries:&lt;/span&gt; Especifica varias queries SQL.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@SQLResultSetMapping:&lt;/span&gt; Permite recoger el resultado de una query SQL.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;ul style="margin-left: 40px;"&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt; &lt;span style="font-style: italic;"&gt;name&lt;/span&gt; - nombre del objeto asignado al mapeo.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;EntityResult[] entities() &lt;/span&gt;- entidades especificadas para el mapeo de los datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;ColumnResult[] columns&lt;/span&gt;() - columnas de la tabla  para el mapeo de los datos.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;               &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;               &lt;div  style="margin-left: 80px;font-family:Courier New;"&gt;  &lt;p align="justify"&gt;&lt;small&gt;@&lt;span style="color: rgb(102, 51, 255);"&gt;NamedNativeQuery&lt;/span&gt;(name="nativeResult", query="SELECT NOMBRE,APELLIDOS FROM USUARIOS WHERE USUARIO_ID= 123", resultSetMapping = "&lt;span style="color: rgb(204, 102, 0);"&gt;usuarioNamedMapping&lt;/span&gt;")&lt;br /&gt;             &lt;/small&gt;&lt;/p&gt;&lt;/div&gt;               &lt;div style="margin-left: 80px;"&gt;  &lt;p align="justify"&gt;&lt;small&gt;&lt;span style="font-family:Courier New;"&gt;@&lt;span style="color: rgb(102, 51, 255);"&gt;SqlResultSetMapping&lt;/span&gt;(name="&lt;/span&gt;&lt;/small&gt;&lt;small style="font-family: Courier New; color: rgb(204, 102, 0);"&gt;usuarioNamedMapping&lt;/small&gt;&lt;small&gt;&lt;span style="font-family:Courier New;"&gt;",&lt;br /&gt;            entities = {&lt;/span&gt;&lt;/small&gt;&lt;br /&gt;              &lt;/p&gt;&lt;/div&gt;               &lt;div style="margin-left: 160px;"&gt;  &lt;p align="justify"&gt;&lt;small&gt;&lt;span style="font-family:Courier New;"&gt; @EntityResult(entityClass = com.autentia.entidades.Usuario.class,&lt;br /&gt;            fields = {&lt;/span&gt;&lt;/small&gt;&lt;br /&gt;              &lt;/p&gt;&lt;/div&gt;               &lt;div style="margin-left: 200px;"&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style="font-family:Courier New;"&gt;@ColumnResult(name="usuarioId", column="USUARIO_ID"),&lt;/span&gt;&lt;/small&gt;&lt;br /&gt;             &lt;/p&gt;&lt;/div&gt;              &lt;div style="margin-left: 200px;"&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style="font-family:Courier New;"&gt; @ColumnResult(name="nombre", column="NOMBRE"),&lt;/span&gt;&lt;/small&gt;&lt;br /&gt;             &lt;small&gt; &lt;span style="font-family:Courier New;"&gt; @ColumnResult(name="apellidos", column="APELLIDOS")})})&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt; &lt;span style="color: rgb(255, 0, 0);font-family:Courier New,monospace;font-size:130%;"  &gt;&lt;span style="font-weight: bold;"&gt;@PersistenceContext&lt;/span&gt;:&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;/span&gt;Objeto de la clase EntityManager que nos proporciona todo lo que necesitamos para manejar la persistencia.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;              &lt;ul style="margin-left: 40px; background-color: rgb(255, 255, 255);"&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt; &lt;span style="font-style: italic;"&gt;name&lt;/span&gt; - nombre del objeto utilizado para la persistencia en caso de ser diferente al de la clase donde se incluye la anotación.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;                &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;unitName &lt;/span&gt;- identifica la unidad de la persistencia usada en el bean en caso de que hubiera má;s de una.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;                &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;type&lt;/span&gt; - tipo de persistencia, TRANSACTION (por defecto) | EXTENDED.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;              &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;              &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PersistenceContexts:&lt;/span&gt; Define varios contextos de persistencia.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;               &lt;p align="justify"&gt;&lt;small&gt; &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@PersistenceUnit:&lt;/span&gt; Indica la dependencia de una EntityManagerFactory definida en el archivo &lt;span style="font-style: italic;"&gt;persistence.xml&lt;/span&gt;.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;             &lt;ul style="margin-left: 40px; background-color: rgb(255, 255, 255);"&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt; &lt;span style="font-style: italic;"&gt;name&lt;/span&gt; - nombre del objeto utilizado para la persistencia en caso de ser diferente al de la clase donde se incluye la anotación.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;  &lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-style: italic;"&gt;unitName &lt;/span&gt;- identifica la unidad de la persistencia usada en el bean en caso de que hubiera má;s de una.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;             &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt; color: rgb(0, 0, 153);" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;span style="font-weight: bold;font-family:Courier New,monospace;" &gt;@Lob:&lt;/span&gt; Se utiliza junto con la anotación &lt;span style="font-family:Courier New,monospace;"&gt;@Basic&lt;/span&gt; para indicar que un campo se debe persistir como un campo de texto largo si la base de datos soporta este tipo.&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/a&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;b&gt;&lt;a name="Mapeos_objeto-relacional_"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;small&gt;&lt;span style=";font-family:Arial,sans-serif;font-size:85%;"  &gt;&lt;small&gt;&lt;br /&gt;&lt;/small&gt;&lt;/span&gt;&lt;/small&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-2506819041369241900?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/2506819041369241900/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=2506819041369241900' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2506819041369241900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2506819041369241900'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/anotaciones-ejb3.html' title='Anotaciones EJB3'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-1362570674696115150</id><published>2009-04-14T01:51:00.000+02:00</published><updated>2009-04-14T01:52:59.659+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam transaction'/><title type='text'>@Transactional</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;seam_reference-2.1.1.GA.pdf line 525 (search for '@Transactional')&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;30.5. Annotations for use with Seam JavaBean&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;components in a J2EE environment&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;Seam provides an annotation that lets you force a rollback of the JTA transaction for certain action&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;listener outcomes.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;@Transactional&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;@Transactional&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;Specifies  that a JavaBean component should have a similar  transactional behavior  to  the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;default behavior of a session bean component. ie. method invocations should take place in&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;a  transaction, and  if no  transaction exists when  the method  is called, a  transaction will be&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;started just for that method. This annotation may be applied at either class or method level.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;Do not use this annotation on EJB 3.0 components, use @TransactionAttribute!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;@ApplicationException&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;@ApplicationException&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;Synonym for javax.ejb.ApplicationException, for use in a pre Java EE 5 environment. Applied&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;to an exception  to denote  that  it  is an application exception and should be  reported  to  the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;client directly(i.e., unwrapped).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;Do  not  use  this  annotation  on  EJB  3.0  components,  use&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;@javax.ejb.ApplicationException instead.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;• rollback — by default false, if true this exception should set the transaction to rollback&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 51);"&gt;only&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-1362570674696115150?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/1362570674696115150/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=1362570674696115150' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1362570674696115150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1362570674696115150'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/transactional.html' title='@Transactional'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-2966841898068166166</id><published>2009-04-14T01:35:00.000+02:00</published><updated>2009-04-14T01:38:47.747+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam transaction'/><title type='text'>seam transaction</title><content type='html'>D:\Development\TOOLS_HOME\taylor\svn\components\branches\taylor-components-1.2.0\taylor-commons\src\test\java\net\taylor\conv\ConversionTest.java&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;protected void persist(EntityManager em) {&lt;br /&gt;    SampleEntity e = new SampleEntity();&lt;br /&gt;    e.setName("e1");&lt;br /&gt;    e.setType(Type.A);&lt;br /&gt;    em.persist(e);&lt;br /&gt;&lt;br /&gt;    e = new SampleEntity();&lt;br /&gt;    e.setName("e2");&lt;br /&gt;    // e.setType(Type.A);&lt;br /&gt;    em.persist(e);&lt;br /&gt;&lt;br /&gt;    e = new SampleEntity();&lt;br /&gt;    e.setName("e3");&lt;br /&gt;    // e.setType(Type.A);&lt;br /&gt;    em.persist(e);&lt;br /&gt;   }&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-2966841898068166166?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/2966841898068166166/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=2966841898068166166' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2966841898068166166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2966841898068166166'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/seam-transaction_14.html' title='seam transaction'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3449156328957364380</id><published>2009-04-14T01:34:00.000+02:00</published><updated>2009-04-14T01:35:30.316+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam transaction'/><title type='text'>seam transaction</title><content type='html'>D:\Development\TOOLS_HOME\taylor\svn\applications\branches\taylor-tracker-1.2.0\ejb\src\main\java\net\taylor\tracker\web\TransactionScript.java&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;public Object run() {&lt;br /&gt;  try {&lt;br /&gt;   EntityManagerFactory emf = (EntityManagerFactory) lookup(persistenceUnitJndiName);&lt;br /&gt;   EntityManager em = emf.createEntityManager();&lt;br /&gt;   UserTransaction t = (UserTransaction) lookup("UserTransaction");&lt;br /&gt;   try {&lt;br /&gt;    t.begin();&lt;br /&gt;    em.joinTransaction();&lt;br /&gt;    Object o = persist(em);// do the work&lt;br /&gt;    em.flush();&lt;br /&gt;    t.commit();&lt;br /&gt;    return o;&lt;br /&gt;   } catch (Exception e) {&lt;br /&gt;    t.rollback();&lt;br /&gt;    throw e;&lt;br /&gt;   } finally {&lt;br /&gt;    em.close();&lt;br /&gt;   }&lt;br /&gt;  } catch (Exception x) {&lt;br /&gt;   throw new RuntimeException(x);&lt;br /&gt;  }&lt;br /&gt; }&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3449156328957364380?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3449156328957364380/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3449156328957364380' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3449156328957364380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3449156328957364380'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/seam-transaction.html' title='seam transaction'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6433546576424225105</id><published>2009-04-14T01:33:00.000+02:00</published><updated>2009-04-14T01:34:22.502+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam transaction'/><title type='text'></title><content type='html'>D:\Development\TOOLS_HOME\taylor\svn\applications\branches\taylor-tracker-1.2.0\ejb\src\main\java\net\taylor\tracker\TrackerInit.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;protected void addGroup(String id, String name, String description) {&lt;br /&gt;  Group group = identityEntityManager.find(Group.class, id);&lt;br /&gt;  if (group == null) {&lt;br /&gt;   group = new Group();&lt;br /&gt;   group.setId(id);&lt;br /&gt;   group.setName(name);&lt;br /&gt;   group.setDescription(description);&lt;br /&gt;   identityEntityManager.persist(group);&lt;br /&gt;  }&lt;br /&gt; }&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6433546576424225105?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6433546576424225105/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6433546576424225105' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6433546576424225105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6433546576424225105'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/ddevelopmenttoolshometaylorsvnapplicati_14.html' title=''/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8285648016662967717</id><published>2009-04-14T01:30:00.000+02:00</published><updated>2009-04-14T01:31:43.116+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam transaction'/><title type='text'></title><content type='html'>D:\Development\TOOLS_HOME\taylor\svn\applications\branches\taylor-tracker-1.1.0\ejb\src\main\java\net\taylor\tracker\web\TransactionScript.java&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;try {&lt;br /&gt;   EntityManagerFactory emf = (EntityManagerFactory) lookup(persistenceUnitJndiName);&lt;br /&gt;   EntityManager em = emf.createEntityManager();&lt;br /&gt;   UserTransaction t = (UserTransaction) lookup("UserTransaction");&lt;br /&gt;   try {&lt;br /&gt;    t.begin();&lt;br /&gt;    em.joinTransaction();&lt;br /&gt;    Object o = persist(em);// do the work&lt;br /&gt;    em.flush();&lt;br /&gt;    t.commit();&lt;br /&gt;    return o;&lt;br /&gt;   } catch (Exception e) {&lt;br /&gt;    t.rollback();&lt;br /&gt;    throw e;&lt;br /&gt;   } finally {&lt;br /&gt;    em.close();&lt;br /&gt;   }&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8285648016662967717?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8285648016662967717/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8285648016662967717' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8285648016662967717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8285648016662967717'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/ddevelopmenttoolshometaylorsvnapplicati.html' title=''/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-2251283906844003182</id><published>2009-04-07T01:31:00.002+02:00</published><updated>2009-04-07T01:35:04.113+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam transaction ApplicationException'/><title type='text'>Definitivo ejemplo de @ApplicationException</title><content type='html'>En el ejemplo dvdstore, hay un @ApplicationException en CheckoutAction.&lt;br /&gt;Está en el método submitOrder(), que tiene un @End.&lt;br /&gt;&lt;br /&gt;Dependiendo de cierta condición lanza una InsufficientQuantityException o hace el persist: &lt;br /&gt;&lt;br /&gt;  em.persist(order);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-2251283906844003182?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/2251283906844003182/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=2251283906844003182' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2251283906844003182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/2251283906844003182'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/definitivo-ejemplo-de.html' title='Definitivo ejemplo de @ApplicationException'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3927063108631329120</id><published>2009-04-07T00:53:00.000+02:00</published><updated>2009-04-07T00:55:43.151+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dvdstore seam'/><title type='text'>dvdstore</title><content type='html'>el proyecto dvdstore ear de los project examples funciona en jboss 4.2, con el seam eap 2.0 de jbstudio y añadiendo a mano el ds.xml&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3927063108631329120?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3927063108631329120/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3927063108631329120' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3927063108631329120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3927063108631329120'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/dvdstore.html' title='dvdstore'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3099710424417547835</id><published>2009-04-06T23:45:00.001+02:00</published><updated>2009-04-06T23:47:06.457+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='embedded maven2'/><title type='text'>maven2 embedded dependencies</title><content type='html'>&lt;blockquote&gt;&lt;pre&gt;&lt;dependencies&gt;&lt;br /&gt;     &lt;dependency&gt;&lt;br /&gt;         &lt;groupid&gt;org.jboss.embedded&lt;/groupid&gt;&lt;br /&gt;         &lt;artifactid&gt;hibernate-all&lt;/artifactid&gt;&lt;br /&gt;         &lt;version&gt;beta3&lt;/version&gt;&lt;br /&gt;         &lt;type&gt;jar&lt;/type&gt;&lt;br /&gt;         &lt;scope&gt;compile&lt;/scope&gt;&lt;br /&gt;     &lt;/dependency&gt;&lt;br /&gt;     &lt;dependency&gt;&lt;br /&gt;         &lt;groupid&gt;org.jboss.seam.embedded&lt;/groupid&gt;&lt;br /&gt;         &lt;artifactid&gt;jboss-embedded-all&lt;/artifactid&gt;&lt;br /&gt;         &lt;version&gt;beta3&lt;/version&gt;&lt;br /&gt;         &lt;type&gt;jar&lt;/type&gt;&lt;br /&gt;         &lt;scope&gt;compile&lt;/scope&gt;&lt;br /&gt;     &lt;/dependency&gt;&lt;br /&gt;     &lt;dependency&gt;&lt;br /&gt;         &lt;groupid&gt;org.jboss.seam.embedded&lt;/groupid&gt;&lt;br /&gt;         &lt;artifactid&gt;thirdparty-all&lt;/artifactid&gt;&lt;br /&gt;         &lt;version&gt;beta3&lt;/version&gt;&lt;br /&gt;         &lt;type&gt;jar&lt;/type&gt;&lt;br /&gt;         &lt;scope&gt;compile&lt;/scope&gt;&lt;br /&gt;     &lt;/dependency&gt;&lt;br /&gt; &lt;/dependencies&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3099710424417547835?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3099710424417547835/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3099710424417547835' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3099710424417547835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3099710424417547835'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/maven2-embedded-dependencies.html' title='maven2 embedded dependencies'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-1863361998369682565</id><published>2009-04-02T00:08:00.000+02:00</published><updated>2009-04-02T00:40:44.510+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam transactionmanager BMT'/><title type='text'>Bean-managed transactions (BMT)</title><content type='html'>Bean-managed transactions (BMT)—Developers should use bean-managed&lt;br /&gt;transactions in order to have a finer-grained control over their transactional&lt;br /&gt;system. For instance, with BMT beans, you can create more than one trans-&lt;br /&gt;action per bean method (see recipe 5.9). A BMT bean is responsible for cre-&lt;br /&gt;ating, propagating, committing, and rolling back its transactions. By not&lt;br /&gt;relying on the container, the bean developer must face the sometimes&lt;br /&gt;daunting task of coordinating a transactional system. EJB applications that&lt;br /&gt;use BMT beans can be every bit as secure and reliable as CMT applications,&lt;br /&gt;but there is a larger chance of developer-introduced transactional errors. In&lt;br /&gt;most cases, the EJB container is sufficient for enterprise applications’ trans-&lt;br /&gt;action management.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-1863361998369682565?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/1863361998369682565/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=1863361998369682565' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1863361998369682565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1863361998369682565'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/04/bean-managed-transactions-bmt.html' title='Bean-managed transactions (BMT)'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8856045481282868948</id><published>2009-03-30T00:25:00.004+02:00</published><updated>2009-03-30T00:39:07.427+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam test testng'/><title type='text'>testng configuration for Seam project</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_aA16ZA_JG8E/Sc_4hOWnjoI/AAAAAAAAAB0/MIu0Y1A5NSc/s1600-h/dvdstore_test_3.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 342px;" src="http://1.bp.blogspot.com/_aA16ZA_JG8E/Sc_4hOWnjoI/AAAAAAAAAB0/MIu0Y1A5NSc/s400/dvdstore_test_3.JPG" alt="" id="BLOGGER_PHOTO_ID_5318742934620180098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_aA16ZA_JG8E/Sc_3vFZm8FI/AAAAAAAAABs/pe2xuGItQK4/s1600-h/dvdstore_test_2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 341px;" src="http://4.bp.blogspot.com/_aA16ZA_JG8E/Sc_3vFZm8FI/AAAAAAAAABs/pe2xuGItQK4/s400/dvdstore_test_2.JPG" alt="" id="BLOGGER_PHOTO_ID_5318742073223344210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_aA16ZA_JG8E/Sc_3ovgBUCI/AAAAAAAAABk/dK8TKuIaAnE/s1600-h/dvdstore_test_1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 365px;" src="http://1.bp.blogspot.com/_aA16ZA_JG8E/Sc_3ovgBUCI/AAAAAAAAABk/dK8TKuIaAnE/s400/dvdstore_test_1.JPG" alt="" id="BLOGGER_PHOTO_ID_5318741964265443362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I'm really getting my nickers in a twist when configuring testng in eclipse.&lt;br /&gt;Actually, the best approach is through Run-&gt;Debug Configurations-&gt;TestNG.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8856045481282868948?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8856045481282868948/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8856045481282868948' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8856045481282868948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8856045481282868948'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/testng-configuration-for-seam-project.html' title='testng configuration for Seam project'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_aA16ZA_JG8E/Sc_4hOWnjoI/AAAAAAAAAB0/MIu0Y1A5NSc/s72-c/dvdstore_test_3.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8423802922180923827</id><published>2009-03-18T00:56:00.000+01:00</published><updated>2009-03-18T00:58:33.305+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam fileupload'/><title type='text'>Seam fileupload samples</title><content type='html'>&lt;a href="http://linuxbeans.blogspot.com/2007/10/image-handling-in-seam-apps-part-ii.html"&gt;subida de imagen&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.theasolutions.com/roller/karthik/entry/big_file_upload_tutorial_using"&gt;Big File Upload&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8423802922180923827?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8423802922180923827/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8423802922180923827' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8423802922180923827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8423802922180923827'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/seam-fileupload-samples.html' title='Seam fileupload samples'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6316753066538416668</id><published>2009-03-17T21:51:00.000+01:00</published><updated>2009-03-17T21:52:00.906+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Embedded JBoss Tomcat6'/><title type='text'>Installing Embedded JBoss into Standalone Tomcat 6.0</title><content type='html'>&lt;h2&gt;&lt;a href="http://www.jboss.org/community/docs/DOC-12413"&gt;&lt;span&gt;Installing Embedded JBoss into Standalone Tomcat 6.0&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6316753066538416668?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6316753066538416668/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6316753066538416668' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6316753066538416668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6316753066538416668'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/installing-embedded-jboss-into.html' title='Installing Embedded JBoss into Standalone Tomcat 6.0'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-1344265811634232215</id><published>2009-03-17T21:45:00.002+01:00</published><updated>2009-03-17T21:46:54.924+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='embedded JBoss maven2'/><title type='text'>Embedded JBoss</title><content type='html'>&lt;h1 align="center"&gt;&lt;a href="http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=ejb3JUnitWithJBoss"&gt;EJB 3.0 y pruebas unitarias&lt;br /&gt;con Maven, JUnit y Embedded JBoss&lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;1.- instalar embedded JBoss&lt;br /&gt;2.- meterlo en un repositorio maven2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-1344265811634232215?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/1344265811634232215/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=1344265811634232215' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1344265811634232215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/1344265811634232215'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/embedded-jboss.html' title='Embedded JBoss'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3780319294647284261</id><published>2009-03-17T19:43:00.004+01:00</published><updated>2009-03-17T21:45:55.110+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate exporters'/><title type='text'>Hibernate exporters</title><content type='html'>&lt;a href="http://docs.huihoo.com/hibernate/tools-reference-3.2.0/ant.html#hbmtemplate"&gt;Hibernate exporters&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 class="title" style="clear: both;"&gt;4.4. Exporters&lt;/h2&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.4.1. Database schema exporter         (&lt;tt class="literal"&gt;&lt;hbm2ddl&gt;&lt;/hbm2ddl&gt;&lt;/tt&gt;)&lt;/h3&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.4.2. POJO java code exporter         (&lt;tt class="literal"&gt;&lt;hbm2java&gt;&lt;/hbm2java&gt;&lt;/tt&gt;)&lt;/h3&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.4.3. Hibernate Mapping files exporter         (&lt;tt class="literal"&gt;&lt;hbm2hbmxml&gt;&lt;/hbm2hbmxml&gt;&lt;/tt&gt;)&lt;/h3&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.4.4. Hibernate Configuration file exporter         (&lt;tt class="literal"&gt;&lt;hbm2cfgxml&gt;&lt;/hbm2cfgxml&gt;&lt;/tt&gt;)&lt;/h3&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.4.5. Documentation exporter         (&lt;tt class="literal"&gt;&lt;hbm2doc&gt;&lt;/hbm2doc&gt;&lt;/tt&gt;)&lt;/h3&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.4.6. Query exporter (&lt;query&gt;)&lt;/query&gt;&lt;/h3&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.4.7. Generic Hibernate metamodel exporter (&lt;tt class="literal"&gt;&lt;hbmtemplate&gt;&lt;/hbmtemplate&gt;&lt;/tt&gt;)&lt;/h3&gt;&lt;br /&gt;&lt;h4 class="title"&gt;4.4.7.1. Seam Exporter via           &lt;tt class="literal"&gt;&lt;hbmtemplate&gt;&lt;/hbmtemplate&gt;&lt;/tt&gt;&lt;/h4&gt;&lt;br /&gt;&lt;h2 class="title" style="clear: both;"&gt;4.5. Using properties to configure Exporters&lt;/h2&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.5.1. &lt;property&gt; &lt;tt class="literal"&gt;&lt;property&gt;&lt;/property&gt;&lt;/tt&gt; and         &lt;tt class="literal"&gt;&lt;propertyset&gt;&lt;/propertyset&gt;&lt;/tt&gt;&lt;propertyset&gt;&lt;/h3&gt;&lt;br /&gt;&lt;h3 class="title"&gt;4.5.2. Getting access to user specific classes&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3780319294647284261?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3780319294647284261/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3780319294647284261' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3780319294647284261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3780319294647284261'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/hibernate-exporters.html' title='Hibernate exporters'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-3077939941173516067</id><published>2009-03-17T16:34:00.001+01:00</published><updated>2009-03-17T16:40:21.585+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam fileupload'/><title type='text'>seam fileupload</title><content type='html'>&lt;a href="http://linuxbeans.blogspot.com/2007/10/image-handling-in-seam-apps-part-ii.html"&gt;http://linuxbeans.blogspot.com/2007/10/image-handling-in-seam-apps-part-ii.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.theasolutions.com/roller/karthik/entry/big_file_upload_tutorial_using"&gt;Big File Upload Tutorial Using Seam&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-3077939941173516067?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/3077939941173516067/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=3077939941173516067' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3077939941173516067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/3077939941173516067'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/seam-fileupload.html' title='seam fileupload'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-921506594539762025</id><published>2009-03-17T11:07:00.001+01:00</published><updated>2009-03-17T11:07:49.414+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stereotypes RSA UML'/><title type='text'>create your own stereotypes</title><content type='html'>This link contains good info how to create your own stereotypes. &lt;a href="http://www.ibm.com/developerworks/rational/library/05/0906_dusko/" class="external free" title="http://www.ibm.com/developerworks/rational/library/05/0906_dusko/" rel="nofollow"&gt;http://www.ibm.com/developerworks/rational/library/05/0906_dusko/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-921506594539762025?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/921506594539762025/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=921506594539762025' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/921506594539762025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/921506594539762025'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/create-your-own-stereotypes.html' title='create your own stereotypes'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-6991064193858347171</id><published>2009-03-16T23:03:00.001+01:00</published><updated>2009-03-16T23:03:57.248+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam maven'/><title type='text'>JBoss Seam and Maven 2</title><content type='html'>&lt;h2&gt;&lt;a href="http://www.jboss.org/community/docs/DOC-10763"&gt;&lt;span&gt;JBoss Seam and Maven 2&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;JBoss Seam, by default, is set up to compile, package, and deploy using Ant. Many developers, however, would like to use Maven 2 to build their application. In order to make the process of configuring Maven to correctly build a Seam project easier, Lunar Logic has created a Maven Archetype that will create an empty Seam project that compiles and packages using Maven 2.&lt;/p&gt;&lt;p style="padding: 0px; min-height: 8pt; height: 8pt;"&gt; &lt;/p&gt;&lt;p&gt;The instructions for obtaining and using the archetype are located on the &lt;a class="jive-link-external-small" href="http://www.lunarlogic.com/blog/show/maven_archetype_for_jboss_seam"&gt;Lunar Logic Blog&lt;/a&gt;.&lt;/p&gt;&lt;p style="padding: 0px; min-height: 8pt; height: 8pt;"&gt; &lt;/p&gt;&lt;p&gt;The instructions don't work quite as advertised, you can, however, download the archetype and install into the local maven2 repos by hand using 'mvn install'.&lt;/p&gt;&lt;p style="padding: 0px; min-height: 8pt; height: 8pt;"&gt; &lt;/p&gt;&lt;p&gt;Also, I am working with the publisher to determine how to find a plugin that is used by the archetype called 'jboss-as-maven2-plugin'.  Currently, you can create a new project, but it fails on any mvn command because it cannot locate this plugin.&lt;/p&gt;&lt;p style="padding: 0px; min-height: 8pt; height: 8pt;"&gt; &lt;/p&gt;&lt;h2&gt;&lt;span&gt;Seam and Maven - archetype and SeamGen like application&lt;/span&gt;&lt;/h2&gt;&lt;p style="padding: 0px; min-height: 8pt; height: 8pt;"&gt; &lt;/p&gt;&lt;p&gt;You can also try &lt;a class="jive-link-external-small" href="http://software.softeu.cz/seam/"&gt;Seam Maven integration by SoftEU&lt;/a&gt;. It provides few archetypes and Maven profiles for easier dependencies and SeamGen like application.&lt;/p&gt;&lt;p style="padding: 0px; min-height: 8pt; height: 8pt;"&gt; &lt;/p&gt;&lt;p style="padding: 0px; min-height: 8pt; height: 8pt;"&gt; &lt;/p&gt;&lt;h2&gt;&lt;span&gt;Script for creating a local maven 2 repo from a seam distribution&lt;/span&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-6991064193858347171?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/6991064193858347171/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=6991064193858347171' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6991064193858347171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/6991064193858347171'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/jboss-seam-and-maven-2.html' title='JBoss Seam and Maven 2'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-5798723160886774361</id><published>2009-03-16T23:01:00.000+01:00</published><updated>2009-03-16T23:02:06.891+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seamgen'/><title type='text'>Two tools, one goal</title><content type='html'>&lt;h2 class="wikiHeadline2" id="H-TwoToolsOneGoal"&gt;&lt;a style="color: orange;" set="yes" linkindex="27" href="http://in.relation.to/Bloggers/UsingASeamgenProjectInJBossTools"&gt;Two tools, one goal&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;div id="j_id337"&gt;                     &lt;h1 class="documentTitle"&gt;&lt;a set="yes" linkindex="26" href="http://in.relation.to/Bloggers/UsingASeamgenProjectInJBossTools"&gt;Using a seam-gen project in JBoss Tools&lt;/a&gt;                     &lt;/h1&gt;&lt;/div&gt;&lt;p class="wikiPara"&gt; The Seam distribution includes a tool named seam-gen to help you get started quickly using Seam. The tool collects information from you about your project and then uses that information to create a project structure. It can also generate a CRUD application by reverse engineering your database schema and generate various forms of stub code. In this entry, you'll learn how to get the generated project setup in Eclipse so that you can leverage the available tooling. &lt;/p&gt;  &lt;h2 class="wikiHeadline2" id="H-TwoToolsOneGoal"&gt;&lt;a style="color: brown;" set="yes" linkindex="27" href="http://in.relation.to/Bloggers/UsingASeamgenProjectInJBossTools#H-TwoToolsOneGoal"&gt;Two tools, one goal&lt;/a&gt;&lt;/h2&gt;  &lt;p class="wikiPara"&gt;There are actually two interfaces to seam-gen. The first is the commandline script named seam, which resides at the root of the Seam distribution. When we talk about seam-gen, we are usually referring to this script. There is also new project wizard in &lt;a linkindex="28" href="http://www.jboss.org/tools" target="" class="regularLink"&gt;JBoss Tools&lt;/a&gt; (the open source project behind &lt;a linkindex="29" href="http://www.jboss.com/products/devstudio" target="" class="regularLink"&gt;JBoss Developer Studio&lt;/a&gt;) that is a complement to this script. Both tools share the same FreeMarker templates inside the seam-gen directory of the Seam distribution to produce the Java code, Facelets views, and TestNG configuration. Aside from these common templates, the two tools work independently of one another in setting up a Seam project. The projects they generate differ in one fundamental way, though. The commandline tool produces projects that are built using Ant, while the JBoss Tools new project wizard creates projects that are build purely with Eclipse builders. &lt;/p&gt;  &lt;p class="wikiPara"&gt;As you'd expect, when you create a project using the Eclipse plug-in, you can immediately start taking advantage of the tooling support for Seam in your project. However, like me, you may find it important to have a project that can be built outside of Eclipse using Ant. That means creating the project using the seam-gen commandline script. Don't fear that by creating the project outside of Eclipse, that the IDE is reduced to a syntax checker and Java compiler. The purpose of this article is to demonstrate how to fully activate the Seam tooling in Eclipse for projects created using the seam-gen commandline script, bringing you the best of both worlds. Plus, once the Seam tooling is activated, you can generate the CRUD application or stub code from either Eclipse or the commandline script. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-5798723160886774361?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/5798723160886774361/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=5798723160886774361' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5798723160886774361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5798723160886774361'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/two-tools-one-goal.html' title='Two tools, one goal'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-5247258867431961938</id><published>2009-03-16T22:31:00.001+01:00</published><updated>2009-03-16T22:44:29.390+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='taylor modify'/><title type='text'>Taylor - Modify Code</title><content type='html'>&lt;h1 class="firstHeading"&gt;&lt;a href="http://taylor.sourceforge.net/index.php/Modify_Code"&gt;Modify Code&lt;/a&gt;      &lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="comments" id="comments"&gt;              &lt;div class="comments-head"&gt;&lt;a href="http://jroller.com/jgilbert01/entry/applying_implied_patterns"&gt;Comments:&lt;/a&gt;&lt;/div&gt;                 &lt;br /&gt;                                                                         &lt;div class="comment odd" id="comment1"&gt;                 Your problem is actually easily solvable.  &lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;RSA (Rational Software Architect) &lt;/span&gt;&lt;/span&gt;does that for you.&lt;br /&gt;&lt;br /&gt;The basic issue is you view model as just a model. However, the tool you are using is viewing your code as the model. The term for it is code visualization.&lt;br /&gt;&lt;br /&gt;You have the right idea in that model should be kept as abstract as possible. That's why RSA separated the concept of modelling from code visualization.&lt;br /&gt;&lt;br /&gt;You just have to get something that would transform your model into other artifacts, which can be code, XML or maybe other models.&lt;br /&gt;&lt;br /&gt;RSA provides you with the tools necessary to do that.                  &lt;p class="comment-details"&gt;                 Posted by                                     &lt;a rel="nofollow" href="http://www.trajano.net/"&gt;&lt;b&gt;Archimedes Trajano&lt;/b&gt;&lt;/a&gt;                                  on August 01, 2006 at 09:53 PM EDT                  &lt;a href="http://www.jroller.com/jgilbert01/entry/applying_implied_patterns#comment-1154483601000" class="entrypermalink" title="comment permalink"&gt;#&lt;/a&gt;                 &lt;/p&gt;              &lt;/div&gt;                                                                                   &lt;div class="comment even" id="comment2"&gt; I agree with the notion that many tools are on the code visualization side of things. And I will concede that RSA can handle this, but not without a lot of work and a lot of cash. I have used rational tools since the early Booch days through the present. You have to jump through a lot of hops, so I decided to build Taylor instead.&lt;br /&gt;&lt;br /&gt;Anyway, my intend was to convey the idea and not so much slam the tools.&lt;br /&gt;&lt;br /&gt;Thanks for your thoughts!&lt;br /&gt;                 &lt;p class="comment-details"&gt;                 Posted by                                     &lt;a rel="nofollow" href="http://taylor.sourceforge.net/"&gt;&lt;b&gt;John Gilbert&lt;/b&gt;&lt;/a&gt;                                  on August 03, 2006 at 05:56 PM EDT                  &lt;a href="http://www.jroller.com/jgilbert01/entry/applying_implied_patterns#comment-1154642161000" class="entrypermalink" title="comment permalink"&gt;#&lt;/a&gt;                 &lt;/p&gt;              &lt;/div&gt;                  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-5247258867431961938?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/5247258867431961938/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=5247258867431961938' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5247258867431961938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/5247258867431961938'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/taylor-modify-code.html' title='Taylor - Modify Code'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-7355291083826679372</id><published>2009-03-14T23:21:00.000+01:00</published><updated>2009-03-14T23:22:03.411+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='core seam reference'/><title type='text'>Core Seam</title><content type='html'>&lt;a href="http://refcardz.dzone.com/refcardz/core-seam"&gt;&lt;span style="font-size:130%;"&gt;Core Seam&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;documento PDF que explica detalladamente Seam por dentro&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-7355291083826679372?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/7355291083826679372/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=7355291083826679372' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7355291083826679372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/7355291083826679372'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/core-seam.html' title='Core Seam'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-4166529832693208334</id><published>2009-03-14T23:08:00.001+01:00</published><updated>2009-03-14T23:10:09.010+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam blog'/><title type='text'>Arrogant Programmer</title><content type='html'>&lt;a href="http://arrogantprogrammer.blogspot.com/2009/01/seam-gen-and-testng-plugin.html"&gt;Blog de un tipo que tiene comentarios interesantes sobre Seam&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-4166529832693208334?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/4166529832693208334/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=4166529832693208334' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4166529832693208334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/4166529832693208334'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/arrogant-programmer.html' title='Arrogant Programmer'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3265551620225769141.post-8655061097359323212</id><published>2009-03-14T22:54:00.002+01:00</published><updated>2009-03-14T22:58:37.819+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate reverse engineering hbm2java'/><title type='text'>Controlling reverse engineering</title><content type='html'>&lt;h2 class="title"&gt;&lt;a href="http://www.hibernate.org/hib_docs/tools/reference/en/html/reverseengineering.html"&gt;Controlling reverse engineering&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;When using the &lt;jdbcconfiguration&gt; the ant task will read the   database metadata and from that perform a reverse engineering of the   database schema into a normal Hibernate Configuration. It is from this   object e.g. &gt;hbm2java&lt;&gt;&lt;/jdbcconfiguration&gt;&lt;/p&gt;&lt;p&gt;To govern this process Hibernate uses a reverse engineering strategy.   A reverse engineering strategy is mainly called to provide more java like   names for tables, column and foreignkeys into classes, properties and   associations. It also used to provide mappings from SQL types to Hibernate   types. The strategy can be customized by the user. The user can even provide   its own custom reverse engineering strategy if the provided strategy is not   enough, or simply just provide a small part of the strategy and delegate the   rest to the default strategy.&lt;/p&gt;&lt;div class="section" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title" style="clear: both;"&gt;&lt;a name="d0e1398"&gt;&lt;/a&gt;5.1. Default reverse engineering strategy&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The default strategy uses some rules for mapping JDBC artifact names     to java artifact names. It also provide basic typemappings from JDBC types     to Hibernate types. It is the default strategy that uses the packagename     attribute to convert a table name to a fully qualified classname.&lt;/p&gt;&lt;/div&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title" style="clear: both;"&gt;&lt;a name="hibernaterevengxmlfile"&gt;&lt;/a&gt;5.2. hibernate.reveng.xml file&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;To have fine control over the process a hibernate.reveng.xml file     can be provided. In this file you can specify type mappings and table     filtering. This file can be created by hand (its just basic XML) or you     can use the Hibernate plugins which have a specialized editor.&lt;/p&gt;&lt;p&gt;Note: many databases is case-sensitive with their names and thus if     you cannot make some table match and you are sure it is not excluded by a     &lt;table-filter&gt; then check if the case matches; most databases stores     table names in uppercase.&lt;/table-filter&gt;&lt;/p&gt;&lt;p&gt;The following is an example of a reveng.xml. Following the example     is more details about the format.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3265551620225769141-8655061097359323212?l=czamorano-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://czamorano-notes.blogspot.com/feeds/8655061097359323212/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3265551620225769141&amp;postID=8655061097359323212' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8655061097359323212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3265551620225769141/posts/default/8655061097359323212'/><link rel='alternate' type='text/html' href='http://czamorano-notes.blogspot.com/2009/03/controlling-reverse-engineering.html' title='Controlling reverse engineering'/><author><name>czamorano</name><uri>http://www.blogger.com/profile/03784647161681656747</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
