Skip to content

Instantly share code, notes, and snippets.


Richard Osmar Leon Ingaruca jrichardsz

View GitHub Profile
View public class Cliente
package com.empresa.modelo;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "cliente")
public class Cliente {
jrichardsz / Ant desplegar War openxava
Last active Feb 5, 2017
Cambios en el ant por defecto de openxava para poder generar un war del proyecto.
View Ant desplegar War openxava
<target name="deployWar">
<!-- In a directory -->
<ant antfile="../OpenXava/build.xml" target="deploy"/>
<!-- In a file (it does not work well on windows + tomcat)
<ant antfile="../OpenXava/build.xml" target="deployWar"/>
jrichardsz / Log de exito al generar el war openxava
Created Oct 13, 2013
Log de exito al generar el war openxava
View Log de exito al generar el war openxava
Buildfile: x:\tutoriales\demos\openxava\workspace\eclipse\openxava-4.8\openxava-4.8\workspace\Empresa\build.xml
[copy] Copying 700 files to x:\tutoriales\demos\openxava\workspace\eclipse\openxava-4.8\openxava-4.8\workspace\Empresa\web\xava
[copy] Copying 47 files to x:\tutoriales\demos\openxava\workspace\eclipse\openxava-4.8\openxava-4.8\workspace\Empresa\web\WEB-INF
jrichardsz / persistence.xml
Created Oct 13, 2013
Configuracion del archivo persistence.xml
View persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns=""
<!-- Tomcat + Hypersonic -->
<persistence-unit name="default">
jrichardsz / hibernate.cfg.xml
Last active Dec 25, 2015
Configuracion del archivo hibernate.cfg.xml
View hibernate.cfg.xml
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
This hibernate configuration is used only for IMAGES_GALLERY stereotype,
because this stereotype is implemented using hibernate native APIs.
If you do not use IMAGE_GALLERY you do not need this file.
The datasource configured here is the datasource in where the images will be
jrichardsz / context.xml
Last active Dec 25, 2015
Datasource Tomcat usado por la aplicacion para conectarse a la base de datos.
View context.xml
<?xml version='1.0' encoding='utf-8'?>
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
jrichardsz / Cambios Persistence.xml
Last active Feb 5, 2017
Cambios en el archivo Persistence.xml
View Cambios Persistence.xml
A.- Dialect :
<persistence-unit name="default">
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
jrichardsz / Cambios hibernate.cfg.xml
Last active Feb 5, 2017
Cambios en el archivo hibernate.cfg.xml
View Cambios hibernate.cfg.xml
Dialect, user and password
<!-- Tomcat + Hypersonic -->
<property name="hibernate.connection.datasource">java:comp/env/jdbc/OpenXavaTestDS</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
jrichardsz / Datasource Tomcat en el archivo context.xml
Created Oct 13, 2013
Datasource Tomcat en el archivo context.xml
View Datasource Tomcat en el archivo context.xml
username="myuser" password="mypass"
validationQuery="select 1"
jrichardsz / build.xml
Last active Dec 25, 2015
Configuracion de driver de coneccion a mysql.
View build.xml
<target name="actualizarEsquema">
<ant antfile="../OpenXava/build.xml" target="updateSchemaJPA">
<property name="persistence.unit" value="junit"/>
<property name="schema.path" value="x:\RICHARD\drivers\mysql-connector-java-5.1.18.jar"/>