This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro do-with-classloader | |
[classloader & body] | |
`(let [old-classloader# (.getContextClassLoader (Thread/currentThread))] | |
(.setContextClassLoader (Thread/currentThread) ~classloader) | |
(try ~@body | |
(finally (.setContextClassLoader (Thread/currentThread) old-classloader#))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package au.com.permeance.service; | |
public interface FakeService { | |
void doStuff() throws Exception; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.1.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_1_0.dtd"> | |
<hook> | |
<portal-properties>portal.properties</portal-properties> | |
</hook> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd | |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> | |
<tx:annotation-driven transaction-manager="transactionManager"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package au.com.permeance.hook; | |
import au.com.permeance.service.FakeService; | |
import com.liferay.portal.kernel.events.ActionException; | |
import com.liferay.portal.kernel.events.SimpleAction; | |
import com.liferay.portal.kernel.servlet.ServletContextPool; | |
import org.springframework.beans.factory.BeanFactory; | |
import org.springframework.web.context.support.WebApplicationContextUtils; | |
import javax.servlet.ServletContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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/maven-v4_0_0.xsd"> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>aspectj-maven-plugin</artifactId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO] --- aspectj-maven-plugin:1.4:compile (default) @ spring-hook --- | |
[INFO] Join point 'method-execution(void au.com.permeance.service.impl.FakeServiceImpl.doStuff())' in Type 'au.com.permeance.service.impl.FakeServiceImpl' (FakeServiceImpl.java:26) advised by before advice from 'org.springframework.transaction.aspectj.AnnotationTransactionAspect' (spring-aspects-3.1.3.RELEASE.jar!AbstractTransactionAspect.class:60(from AbstractTransactionAspect.aj)) | |
[INFO] Join point 'method-execution(void au.com.permeance.service.impl.FakeServiceImpl.doStuff())' in Type 'au.com.permeance.service.impl.FakeServiceImpl' (FakeServiceImpl.java:26) advised by afterThrowing advice from 'org.springframework.transaction.aspectj.AnnotationTransactionAspect' (spring-aspects-3.1.3.RELEASE.jar!AbstractTransactionAspect.class:67(from AbstractTransactionAspect.aj)) | |
[INFO] Join point 'method-execution(void au.com.permeance.service.impl.FakeServiceImpl.doStuff())' in Type 'au.com.permeance.service.impl.FakeServiceImpl' (FakeServiceImpl.j |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package au.com.permeance.hook; | |
import au.com.permeance.service.FakeService; | |
import com.liferay.portal.kernel.events.ActionException; | |
import com.liferay.portal.kernel.events.SimpleAction; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Configurable; | |
import static org.springframework.beans.factory.annotation.Autowire.BY_TYPE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | |
<appender name="SQL_FILE" class="org.apache.log4j.rolling.RollingFileAppender"> | |
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> | |
<param name="FileNamePattern" value="@liferay.home@/logs/sql.%d{yyyy-MM-dd}.log" /> | |
</rollingPolicy> | |
<layout class="org.apache.log4j.PatternLayout"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO GROUP_ VALUES(10614,10154,10196,10001,10614,0,0,'Test Site','This is a test site',2,'','/test-site','1','1') | |
INSERT INTO LAYOUTSET VALUES(10615,10614,10154,'2013-01-09 16:56:01.504000','2013-01-09 16:56:01.504000','1','0',0,'classic','01','mobile','01','',0,'','','0') | |
INSERT INTO LAYOUTSET VALUES(10616,10614,10154,'2013-01-09 16:56:01.506000','2013-01-09 16:56:01.506000','0','0',0,'classic','01','mobile','01','',0,'','','0') | |
INSERT INTO RESOURCEPERMISSION VALUES(611,10154,'com.liferay.portal.model.Group',4,'10614',10163,0,2097151) | |
INSERT INTO USERGROUPROLE VALUES(10196,10614,10171) | |
INSERT INTO USERS_GROUPS VALUES(10196,10614) | |
INSERT INTO ASSETENTRY VALUES(10617,10192,10154,10196,'Test Test','2013-01-09 16:56:02.502000','2013-01-09 16:56:02.502000',10001,10614,'',0,'0',NULL,NULL,NULL,NULL,'','Test Site','This is a test site','','','',0,0,0.0E0,0) | |
COMMIT |