Some time the Oracle connections stay open, blocking the other transactions, there’s no other option than kill it. We firstly need to identify it, as system user, execute the following query: SELECT s.inst_id, s.sid, s.serial#, p.spid, s.username, s.program FROM gv$session s JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id WHERE s.type !=… Continue reading Kill Oracle sessions
Month: March 2014
Define the Java version in Maven
Directly in the pom.xml (resource definition is also included): <?xml version=”1.0″ encoding=”UTF-8″?> <project xmlns=”http://maven.apache.org/POM/4.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd”> … <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>**/*</include> </includes> <excludes> <exclude>profiles/**</exclude> </excludes> </resource> <resource> <directory>src/main/resources/profiles/${profile.name}</directory> <includes> <include>*.properties</include> <include>*.xml</include> </includes> </resource> </resources> </build> </project>
Add datasource access in tests
In my web applications, the datasource is often defined in Tomcat (see here), when I execute my integration tests using JUnit, I don’t need Tomcat, but I need an access to the database, and to the Spring context too. My solution is to create an abstract test which provides me these features, I use: the… Continue reading Add datasource access in tests