miércoles, 4 de mayo de 2011

Instalando Jar Manualmente

A veces necesitamos instalar manualmente un jar en nuestro repositorio local, por ejemplo si queremos instalar JASPER para hacer nuestros reportes. Abrimos un consola de windows y ejecutamos

mvn install:install-file
-DgroupId=jasperreports
-DartifactId=jasperreports
-Dversion=3.6.0
-Dpackaging=jar
-Dfile=C:\Mario\Desarrollo\jars\jasperreports-3.6.0.jar

install:install-file Es el "Maven Goal" que estamos ejecutando
-Dversion, -Dpackaging y -Dfile Es información que conseguimos del archivo jar
-DgroupId, -DartifactId Es posible que esta información ya este en algún POM nuestro, en caso contrario googlear buscando algún POM que tenga la dependencia que estamos instalando
y copiar de ahí




sábado, 2 de abril de 2011

Explica paso a paso conexion interaccion BD con DriverManager, viejo pero sirve igual
http://www.jdbc-tutorial.com/

comparacion datasource and drivermanager
http://zetcode.com/tutorials/jeetutorials/datasource/

arquitectura hibernate
http://docs.jboss.org/hibernate/core/3.6/reference/es-ES/html/architecture.html

crear tu JDBC Driver
http://www.javaworld.com/javaworld/jw-05-2002/jw-0517-jdbcdriver.html

JDBC Tutorials
http://www.roseindia.net/tutorial/java/jdbc/complete-jdbc-tutorial.html

JDTS Driver pure Java
http://jtds.sourceforge.net/

Hibernate and JDBC

One of the objectives of Hibernate and other ORM tools is to abstract the persistence of an object. Hibernate works hard to provide as much flexibility as JDBC offers while at the same time removing much of the maintenance headaches that are associated with managing SQL statements embedded into an application.

There are some additional considerations and complexity that must be tackled, but this quickly becomes a non-issue as a developer becomes adept with the framework. The complexities that were ones a problem with JDBC (connection management, connection pooling, caching, lazy-loading associations, etc.) become configuration driven and no longer an issue for a developer to contend with.

With HQL (Hibernate Query Language) the developer can achieve nearly all of the same semantics that are available in SQL. All the power of the relational database is still present and can even be reinforced in the application through column definition, foreign keys, etc. on the object meta-data (which is amazingly simple with annotations).

If you additionally leverage Spring in conjunction with Hibernate (or JPA) you will also reap the benefit of springs transaction management, connection management, etc. and still have access to the underlying JDBC connection if you find a reason to need it.

A veces es mejor usar JDBC directamente en una query compleja, Hibernate nos soluciona el mapeo de nuestros objetos, pero en caso de querys de recuperacion de datos particulares, que por ahi no estan mapeados a objetos, o incluso objetos pero tales que el mapping no nos ayuda a obtener lo que queremos (caso JBPM_VARIABLEINSTANCE, Hibernate 3.5) conviene obtener el dato con JDBC, no perdamos de vista que Hibernate USA Jdbc


http://forum.springsource.org/archive/index.php/t-10359.html



MVN install file

cuando no funciona nuestro repositorio, por A o po B, maven y eclipse no logran recuperar
en esos casos lo mejor creo es borrar la carpeta del repo local y volver a instalar como



mvn install:install-file -Dfile=C:\Mario\1.0.1-SNAPSHOT\javadbf-1.0.1-SNAPSHOT.jar -DgroupId=com.latintech -DartifactId=javadbf -Dversion=1.0.1-SNAPSHOT -Dpackaging=jar -DlocalRepositoryPath=C:\Mario\.m2\repository

lunes, 28 de marzo de 2011

comex ideas

http://www.theanswerbank.co.uk/How-it-Works/article/what-is-swift-payment/
http://www.itau.com.py/empresas/comercio_exterior.php
http://www.e-galicia.com/portal/site/eGalicia/menuitem.923bf72e87dfb5aa1aad5341222011ca