/impl/conf/app.properties |
---|
72,7 → 72,6 |
server.estgp=http://www.estgp.pt |
estgp.encoding=ISO-8859-1 |
#server.estgp.start.path=/templates |
server.estgp.start.path=/testes/nova_web |
#server.estgp=http://www.estgp.pt/testes/nova_web |
/impl/conf/hibernate.cfg.xml |
---|
10,15 → 10,17 |
<property name="connection.password">@database.password@</property> |
<property name="connection.autocommit">false</property> |
<property name="dialect">org.hibernate.dialect.MySQLDialect</property> |
<property name="hibernate.connection.autoReconnect">true</property> |
<property name="hibernate.connection.autoReconnectForPools">true</property> |
<property name="show_sql">@hibernate.show.sql@</property> |
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property> |
<property name="connection.pool_size">10</property> |
<!--<property name="connection.pool_size">2</property>--> |
<property name="hibernate.transaction.auto_close_session">true</property> |
<property name="hibernate.connection.release_mode ">after_transaction</property> |
<!--<property name="hibernate.c3p0.min_size">5</property>--> |
<!--<property name="hibernate.c3p0.max_size">20</property>--> |
<!--<property name="hibernate.c3p0.timeout">1800</property>--> |
<!--<property name="hibernate.max_statements">50</property>--> |
<property name="hibernate.connection.release_mode">after_transaction</property> |
<property name="hibernate.c3p0.min_size">2</property> |
<property name="hibernate.c3p0.max_size">30</property> |
<property name="hibernate.c3p0.timeout">500</property> |
<property name="hibernate.max_statements">50</property> |
<!--<property name="current_session_context_class">org.hibernate.context.CurrentSessionContext</property>--> |
29,4 → 31,4 |
{0} |
</session-factory> |
</hibernate-configuration> |
</hibernate-configuration> |
/impl/src/java/pt/utl/ist/berserk/storage/hibernate/HibernateTransactionBroker.java |
---|
41,7 → 41,7 |
public void commitTransaction() throws StorageException |
{ |
HibernateUtils.getCurrentSession().getTransaction().commit(); |
HibernateUtils.getCurrentSession().close(); |
// HibernateUtils.getCurrentSession().close(); |
} |
50,7 → 50,7 |
Session sess = HibernateUtils.getCurrentSession(); |
Transaction t = sess.getTransaction(); |
t.rollback(); |
sess.close(); |
// sess.close(); |
} |
public void lockRead(List list) throws StorageException |
/impl/src/hbm/pt/estgp/estgweb/domain/GenericUser.hbm.xml |
---|
53,11 → 53,11 |
<key column="user_id"/> |
<one-to-many class="pt.estgp.estgweb.domain.CourseUserAssociation"/> |
</set> |
<set name="creatorRecords" lazy="true" order-by="recordId" table="creatorRecords"> |
<set name="creatorRecords" lazy="true" order-by="recordId" table="creatorrecords"> |
<key column="creatorId"/> |
<many-to-many class="pt.estgp.estgweb.domain.Record" column="recordId"/> |
</set> |
<set name="contributorRecords" lazy="true" order-by="recordId" table="contributorRecords"> |
<set name="contributorRecords" lazy="true" order-by="recordId" table="contributorrecords"> |
<key column="contributorId"/> |
<many-to-many class="pt.estgp.estgweb.domain.Record" column="recordId"/> |
</set> |
97,7 → 97,7 |
<property name="unitCheck" type="boolean"/> |
<property name="academicDegree" type="string"/> |
<property name="localRemovedTeachedUnits" type="string"/> |
<set name="teachedUnits" lazy="true" order-by="courseUnitId" table="teachedUnits"> |
<set name="teachedUnits" lazy="true" order-by="courseUnitId" table="teachedunits"> |
<key column="teacherId"/> |
<many-to-many class="pt.estgp.estgweb.domain.CourseUnit" column="courseUnitId"/> |
</set> |
/impl/src/hbm/pt/estgp/estgweb/domain/Record.hbm.xml |
---|
4,7 → 4,7 |
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.Record" table="profileRecord" abstract="true"> |
<class name="pt.estgp.estgweb.domain.Record" table="profilerecord" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
24,11 → 24,11 |
<property name="identifier" type="string"/> |
<property name="repositoryStream" type="string" index="repositoryStreamIndex"/> |
<many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="false" outer-join="true"/> |
<set name="creators" lazy="true" table="creatorRecords"> |
<set name="creators" lazy="true" table="creatorrecords"> |
<key column="recordId"/> |
<many-to-many class="pt.estgp.estgweb.domain.User" column="creatorId"/> |
</set> |
<set name="contributors" lazy="true" table="contributorRecords"> |
<set name="contributors" lazy="true" table="contributorrecords"> |
<key column="recordId"/> |
<many-to-many class="pt.estgp.estgweb.domain.User" column="contributorId"/> |
</set> |
/impl/src/hbm/pt/estgp/estgweb/domain/RepositoryFile.hbm.xml |
---|
4,7 → 4,7 |
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.RepositoryFile" table="repositoryFile" abstract="true"> |
<class name="pt.estgp.estgweb.domain.RepositoryFile" table="repositoryfile" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
24,7 → 24,7 |
<subclass name="pt.estgp.estgweb.domain.RepositoryFileImpl" discriminator-value="RepositoryFileImpl"/> |
</class> |
<class name="pt.estgp.estgweb.domain.RepositoryFileVersion" table="repositoryFileVersion" abstract="true"> |
<class name="pt.estgp.estgweb.domain.RepositoryFileVersion" table="repositoryfileversion" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
/impl/src/hbm/pt/estgp/estgweb/domain/CourseUnit.hbm.xml |
---|
4,7 → 4,7 |
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.CourseUnit" table="courseUnit" abstract="true"> |
<class name="pt.estgp.estgweb.domain.CourseUnit" table="courseunit" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
/impl/src/hbm/pt/estgp/estgweb/domain/IdentifiersManagement.hbm.xml |
---|
4,7 → 4,7 |
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.ManagedIdentifier" table="managedIdentifier" abstract="true"> |
<class name="pt.estgp.estgweb.domain.ManagedIdentifier" table="managedidentifier" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
/impl/build.properties |
---|
11,7 → 11,7 |
database.catalog=estgweb |
database.username=root |
database.password= |
database.connection.url=jdbc:mysql://${database.host}:${database.port}/${database.catalog}?useUnicode=true&characterEncoding=UTF-8 |
database.connection.url=jdbc:mysql://${database.host}:${database.port}/${database.catalog}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true |
hibernate.show.sql=false |
use.ldap=true |
/impl/build.xml |
---|
92,25 → 92,25 |
<target name="tomcat.deployContext" depends="build.war"> |
<echo message="${tomcat.manager}"/> |
<tomcat.install url="${tomcat.manager}" path="${tomcat.context.path.install}" |
config="file://${basedir}/${dist.dir}/estgweb.xml" |
config="file:${basedir}/${dist.dir}/estgweb.xml" |
username="${tomcat.username}" password="${tomcat.password}" /> |
</target> |
<target name="tomcat.redeployContext" depends="tomcat.undeploy,build.war" > |
<echo message="${tomcat.manager}"/> |
<tomcat.install url="${tomcat.manager}" path="${tomcat.context.path.install}" |
config="file:/${basedir}/${dist.dir}/estgweb.xml" |
config="file:${basedir}/${dist.dir}/estgweb.xml" |
username="${tomcat.username}" password="${tomcat.password}" /> |
</target> |
<target name="tomcat.deploy" depends="build.war" > |
<echo message="${tomcat.manager}"/> |
<target name="tomcat.deploy" depends="war" > |
<echo message="${tomcat.manager} path:${tomcat.context.path.install} warfile:file:${basedir}/${dist.dir}/${tomcat.war.file}"/> |
<tomcat.deploy url="${tomcat.manager}" path="${tomcat.context.path.install}" |
war="file:/${basedir}/${dist.dir}/${tomcat.war.file}" |
war="file:${basedir}/${dist.dir}/${tomcat.war.file}" |
username="${tomcat.username}" password="${tomcat.password}" /> |
</target> |
<target name="tomcat.redeploy" depends="tomcat.undeploy,build.war"> |
<echo message="${tomcat.manager}"/> |
<target name="tomcat.redeploy" depends="tomcat.undeploy,war"> |
<echo message="${tomcat.manager} path:${tomcat.context.path.install} warfile:file:${basedir}/${dist.dir}/${tomcat.war.file}"/> |
<tomcat.deploy url="${tomcat.manager}" path="${tomcat.context.path.install}" |
war="file:/${basedir}/${dist.dir}/${tomcat.war.file}" |
war="file:${basedir}/${dist.dir}/${tomcat.war.file}" |
username="${tomcat.username}" password="${tomcat.password}" /> |
</target> |
<target name="tomcat.undeploy"> |
144,7 → 144,7 |
<antcall target="createConfigurationFiles"/> |
</target> |
<target name="compile" depends="initDirs" description="Compile All"> |
<javac encoding="UTF-8" source="1.5" target="1.5" destdir="${build.dir.classes}" debug="false" optimize="true" fork="true" deprecation="false" verbose="false" failonerror="true"> |
<javac encoding="UTF-8" source="1.5" target="1.5" destdir="${build.dir.classes}" debug="true" optimize="true" fork="true" deprecation="false" verbose="false" failonerror="true"> |
<src path="${src.dir}"/> |
<src path="${gen.dir.java}"/> |
<classpath refid="pathToToolsLib"/> |