Seam SVN: r13912 - in branches/community/Seam_2_2/examples: blog and 3 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-11-16 05:47:20 -0500 (Tue, 16 Nov 2010)
New Revision: 13912
Added:
branches/community/Seam_2_2/examples/blog/build-jboss6.xml
branches/community/Seam_2_2/examples/blog/jboss6/
branches/community/Seam_2_2/examples/blog/jboss6/src/
branches/community/Seam_2_2/examples/blog/jboss6/src/actions/
branches/community/Seam_2_2/examples/blog/jboss6/src/actions/SearchService.java
Modified:
branches/community/Seam_2_2/examples/blog/build.xml
branches/community/Seam_2_2/examples/blog/readme.txt
branches/community/Seam_2_2/examples/build.xml
Log:
added jboss as6 build script for blog example
Added: branches/community/Seam_2_2/examples/blog/build-jboss6.xml
===================================================================
--- branches/community/Seam_2_2/examples/blog/build-jboss6.xml (rev 0)
+++ branches/community/Seam_2_2/examples/blog/build-jboss6.xml 2010-11-16 10:47:20 UTC (rev 13912)
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+
+<project name="Blog" default="deploy" basedir=".">
+
+ <!-- Naming -->
+ <property name="Name" value="Seam Blog Example"/>
+ <property name="example.name" value="jboss-seam-blog"/>
+ <property name="jboss6" value="yes"/>
+
+
+ <target name="init" depends="preparesrc">
+ <antcall target="SeamExample.init"/>
+ <path id="build.classpath.extras">
+ <fileset dir="${lib.search.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ </target>
+
+ <target name="preparesrc">
+ <mkdir dir="${src.java.dir}"/>
+
+ <copy todir="${src.java.dir}">
+ <fileset includes="**" dir="jboss6/src" />
+ </copy>
+ <copy todir="${src.java.dir}">
+ <fileset includes="**" excludes="src/actions/SearchService.java" dir="src"/>
+ </copy>
+
+ </target>
+
+ <import file="../build.xml"/>
+
+</project>
Property changes on: branches/community/Seam_2_2/examples/blog/build-jboss6.xml
___________________________________________________________________
Name: svn:executable
+ *
Modified: branches/community/Seam_2_2/examples/blog/build.xml
===================================================================
--- branches/community/Seam_2_2/examples/blog/build.xml 2010-11-16 10:36:44 UTC (rev 13911)
+++ branches/community/Seam_2_2/examples/blog/build.xml 2010-11-16 10:47:20 UTC (rev 13912)
@@ -18,9 +18,13 @@
<property name="clean.extra" value="${basedir}/blogindexes" />
- <target name="jboss42" description="Build the Blog example artifacts, and deploy to JBoss 4.2.x.GA">
+ <target name="jboss42" description="Build the Blog example artifacts, and deploy to JBoss AS 4.2.x.GA">
<ant antfile="build-jboss42.xml"/>
</target>
+ <target name="jboss6" description="Build the Blog example artifacts, and deploy to JBoss AS 6">
+ <ant antfile="build-jboss6.xml"/>
+ </target>
+
<import file="../build.xml"/>
</project>
Added: branches/community/Seam_2_2/examples/blog/jboss6/src/actions/SearchService.java
===================================================================
--- branches/community/Seam_2_2/examples/blog/jboss6/src/actions/SearchService.java (rev 0)
+++ branches/community/Seam_2_2/examples/blog/jboss6/src/actions/SearchService.java 2010-11-16 10:47:20 UTC (rev 13912)
@@ -0,0 +1,74 @@
+package actions;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.queryParser.MultiFieldQueryParser;
+import org.apache.lucene.queryParser.ParseException;
+import org.apache.lucene.queryParser.QueryParser;
+import org.apache.lucene.util.Version;
+import org.hibernate.search.jpa.FullTextEntityManager;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+
+import domain.BlogEntry;
+
+/**
+ * Pulls the search results
+ *
+ * @author Gavin King
+ */
+@Name("searchService")
+public class SearchService
+{
+
+ @In
+ private FullTextEntityManager entityManager;
+
+ private String searchPattern;
+
+ @Factory("searchResults")
+ public List<BlogEntry> getSearchResults()
+ {
+ if (searchPattern==null || "".equals(searchPattern) ) {
+ searchPattern = null;
+ return entityManager.createQuery("select be from BlogEntry be order by date desc").getResultList();
+ }
+ else
+ {
+ Map<String,Float> boostPerField = new HashMap<String,Float>();
+ boostPerField.put( "title", 4f );
+ boostPerField.put( "body", 1f );
+ String[] productFields = {"title", "body"};
+ QueryParser parser = new MultiFieldQueryParser(Version.LUCENE_30, productFields, new StandardAnalyzer(Version.LUCENE_30), boostPerField);
+ parser.setAllowLeadingWildcard(true);
+ org.apache.lucene.search.Query luceneQuery;
+ try
+ {
+ luceneQuery = parser.parse(searchPattern);
+ }
+ catch (ParseException e)
+ {
+ return null;
+ }
+
+ return entityManager.createFullTextQuery(luceneQuery, BlogEntry.class)
+ .setMaxResults(100)
+ .getResultList();
+ }
+ }
+
+ public String getSearchPattern()
+ {
+ return searchPattern;
+ }
+
+ public void setSearchPattern(String searchPattern)
+ {
+ this.searchPattern = searchPattern;
+ }
+
+}
Modified: branches/community/Seam_2_2/examples/blog/readme.txt
===================================================================
--- branches/community/Seam_2_2/examples/blog/readme.txt 2010-11-16 10:36:44 UTC (rev 13911)
+++ branches/community/Seam_2_2/examples/blog/readme.txt 2010-11-16 10:47:20 UTC (rev 13912)
@@ -8,4 +8,8 @@
JBoss AS 4.2 needs additional hibernate libraries, use ant target jboss42 for deploying to it.
+JBoss AS 6 needs new hibernate search and hibernate-commons-annotations, and more source code enhancement due Hibernate Search and Lucene-Core
+API changes. Therefore use ant target jboss6 for deploying to JBoss AS 6 M5 and later. For instance:
+$ant jboss6 -Djboss6=yes
+
example.name=blog
Modified: branches/community/Seam_2_2/examples/build.xml
===================================================================
--- branches/community/Seam_2_2/examples/build.xml 2010-11-16 10:36:44 UTC (rev 13911)
+++ branches/community/Seam_2_2/examples/build.xml 2010-11-16 10:47:20 UTC (rev 13912)
@@ -24,8 +24,28 @@
<!-- Settings -->
<property name="loadPersistenceUnits" value="true"/>
- <!-- Source directories -->
- <property name="src.java.dir" value="src" />
+ <!-- different setup for jboss6 enviroment -->
+ <condition property="exploded-archives.dir" value="exploded-archives-jbossas6" else="exploded-archives">
+ <isset property="jboss6"/>
+ </condition>
+ <condition property="src.java.dir" value="staging-jbossas6/src" else="src">
+ <isset property="jboss6"/>
+ </condition>
+ <condition property="dist.dir" value="dist-jbossas6" else="dist">
+ <isset property="jboss6"/>
+ </condition>
+ <condition property="staging.dir" value="staging-jbossas6">
+ <isset property="jboss6"/>
+ </condition>
+ <condition property="example.lib.dir" value="lib">
+ <isset property="jboss6"/>
+ </condition>
+ <condition property="lib.search.dir" value="${example.lib.dir}" else="${seam.dir}/lib">
+ <isset property="jboss6"/>
+ </condition>
+
+ <!-- Source directories -->
+ <property name="src.java.dir" value="src" />
<property name="src.test.dir" value="src" />
<property name="view.dir" value="view" />
<property name="resources.dir" value="resources" />
@@ -45,7 +65,7 @@
<property name="meldware.dir" value="${lib.dir}/meldware.deployable" />
<!-- Target directories -->
- <property name="dist.dir" value="dist" />
+ <property name="dist.dir" value="dist" />
<property name="exploded-archives.dir" value="exploded-archives" />
<property name="ear.dir" value="${exploded-archives.dir}/${example.name}.ear" />
<property name="jar.dir" value="${exploded-archives.dir}/${example.name}.jar" />
@@ -338,10 +358,13 @@
</fileset>
<!-- Dependencies for using Seam with Hibernate Search -->
- <fileset id="search.jar" dir="${lib.dir}">
+ <fileset id="search.jar" dir="${lib.search.dir}">
<include name="lucene-core.jar" if="search.lib" />
+ <include name="lucene-analyzers.jar" if="jboss6"/>
<include name="hibernate-search.jar" if="search.lib" />
+ <include name="hibernate-search-analyzers.jar" if="jboss6"/>
<include name="hibernate-commons-annotations.jar" if="search.lib" />
+ <!-- <include name="hibernate-core.jar" if="search.lib" /> remove or add condition for jboss42 only -->
</fileset>
<!-- Dependencies for using Seam with Drools -->
@@ -583,7 +606,9 @@
<exclude name="jboss-seam-pdf.jar" />
<!-- <exclude name="jboss-seam-flex.jar" /> -->
<exclude name="jboss-seam-excel.jar" />
- <exclude name="jboss-seam-rss.jar" />
+ <exclude name="jboss-seam-rss.jar" />
+ <exclude name="hibernate-search.jar" if="jboss6"/>
+ <exclude name="lucene-core.jar" if="jboss6"/>
</fileset>
<path refid="build.classpath.extras" />
</path>
@@ -622,9 +647,17 @@
<mkdir dir="${dist.dir}" />
</target>
- <target name="copyextradependencies" depends="gettrinidad, getmetawidget, getelri"/>
+ <target name="copyextradependencies" depends="gettrinidad, getmetawidget, getelri, gethsearch3.3"/>
<target name="getmetawidget" depends="getmetawidget-war,getmetawidget-ear"/>
+
+ <target name="gethsearch3.3" if="jboss6">
+ <copyInlineDependencies id="org.hibernate.search" scope="runtime" todir="${example.lib.dir}">
+ <dependency groupId="org.hibernate" artifactId="hibernate-search" version="3.3.0.CR1">
+ <exclusion groupId="org.hibernate" artifactId="hibernate-core"/>
+ </dependency>
+ </copyInlineDependencies>
+ </target>
<target name="getmetawidget-war" if="metawidget-war.lib">
<copyInlineDependencies id="metawidget" scope="runtime" todir="${lib.dir}">
@@ -743,6 +776,8 @@
<delete dir="${jar.dir}" />
<delete dir="${test.dir}" />
<delete dir="${clean.extra}" />
+ <delete dir="${staging.dir}" />
+ <delete dir="${example.lib.dir}" />
</target>
14 years
Seam SVN: r13911 - in branches/community/Seam_2_2/src: wicket/org/jboss/seam/wicket/ioc and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-11-16 05:36:44 -0500 (Tue, 16 Nov 2010)
New Revision: 13911
Modified:
branches/community/Seam_2_2/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java
branches/community/Seam_2_2/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java
branches/community/Seam_2_2/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java
branches/community/Seam_2_2/src/wicket/org/jboss/seam/wicket/ioc/WicketInstrumentationTask.java
Log:
sorted out some compiler warnings
Modified: branches/community/Seam_2_2/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java
===================================================================
--- branches/community/Seam_2_2/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java 2010-11-16 10:31:03 UTC (rev 13910)
+++ branches/community/Seam_2_2/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java 2010-11-16 10:36:44 UTC (rev 13911)
@@ -21,6 +21,16 @@
*/
package org.jboss.seam.resteasy;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
+
+import java.lang.annotation.Annotation;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.ws.rs.ext.Providers;
+
import org.jboss.resteasy.core.Dispatcher;
import org.jboss.resteasy.core.SynchronousDispatcher;
import org.jboss.resteasy.core.ThreadLocalResteasyProviderFactory;
@@ -28,7 +38,6 @@
import org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory;
import org.jboss.resteasy.spi.Registry;
import org.jboss.resteasy.spi.ResourceFactory;
-import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.jboss.resteasy.spi.StringConverter;
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
@@ -50,16 +59,7 @@
import org.jboss.seam.log.Log;
import org.jboss.seam.util.EJB;
import org.jboss.seam.util.Reflections;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-import java.lang.annotation.Annotation;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.ws.rs.ext.Providers;
-
/**
* Detects (through scanning and configuration) JAX-RS resources and providers, then
* registers them with RESTEasy.
Modified: branches/community/Seam_2_2/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java
===================================================================
--- branches/community/Seam_2_2/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java 2010-11-16 10:31:03 UTC (rev 13910)
+++ branches/community/Seam_2_2/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java 2010-11-16 10:36:44 UTC (rev 13911)
@@ -21,44 +21,38 @@
*/
package org.jboss.seam.resteasy;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.SecurityContext;
+
+import org.jboss.resteasy.core.Dispatcher;
+import org.jboss.resteasy.core.SynchronousDispatcher;
+import org.jboss.resteasy.core.ThreadLocalResteasyProviderFactory;
+import org.jboss.resteasy.plugins.server.servlet.HttpServletInputMessage;
+import org.jboss.resteasy.plugins.server.servlet.HttpServletResponseWrapper;
+import org.jboss.resteasy.plugins.server.servlet.ServletSecurityContext;
+import org.jboss.resteasy.plugins.server.servlet.ServletUtil;
+import org.jboss.resteasy.specimpl.UriInfoImpl;
+import org.jboss.resteasy.spi.HttpRequest;
+import org.jboss.resteasy.spi.HttpResponse;
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.log.Log;
import org.jboss.seam.servlet.ContextualHttpServletRequest;
import org.jboss.seam.web.AbstractResource;
import org.jboss.seam.web.Session;
-import org.jboss.resteasy.core.SynchronousDispatcher;
-import org.jboss.resteasy.core.ThreadLocalResteasyProviderFactory;
-import org.jboss.resteasy.core.Dispatcher;
-import org.jboss.resteasy.plugins.server.servlet.HttpServletInputMessage;
-import org.jboss.resteasy.plugins.server.servlet.HttpServletResponseWrapper;
-import org.jboss.resteasy.plugins.server.servlet.ServletSecurityContext;
-import org.jboss.resteasy.plugins.server.servlet.ServletUtil;
-import org.jboss.resteasy.specimpl.PathSegmentImpl;
-import org.jboss.resteasy.specimpl.UriBuilderImpl;
-import org.jboss.resteasy.specimpl.UriInfoImpl;
-import org.jboss.resteasy.spi.HttpRequest;
-import org.jboss.resteasy.spi.HttpResponse;
-import org.jboss.resteasy.util.PathHelper;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.PathSegment;
-import javax.ws.rs.core.SecurityContext;
-import javax.ws.rs.core.UriBuilder;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.util.List;
-
/**
* Accepts incoming HTTP requests through the <tt>SeamResourceServlet</tt> and
* dispatches the call to RESTEasy. Wraps the call in Seam contexts.
Modified: branches/community/Seam_2_2/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java
===================================================================
--- branches/community/Seam_2_2/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java 2010-11-16 10:31:03 UTC (rev 13910)
+++ branches/community/Seam_2_2/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java 2010-11-16 10:36:44 UTC (rev 13911)
@@ -403,7 +403,7 @@
* interface
* </ul>
* @param clazz The class to check
- * @return
+ * @return boolean value if the class can be instrumented or not
*/
public boolean isInstrumentable(CtClass clazz)
{
Modified: branches/community/Seam_2_2/src/wicket/org/jboss/seam/wicket/ioc/WicketInstrumentationTask.java
===================================================================
--- branches/community/Seam_2_2/src/wicket/org/jboss/seam/wicket/ioc/WicketInstrumentationTask.java 2010-11-16 10:31:03 UTC (rev 13910)
+++ branches/community/Seam_2_2/src/wicket/org/jboss/seam/wicket/ioc/WicketInstrumentationTask.java 2010-11-16 10:36:44 UTC (rev 13911)
@@ -1,13 +1,10 @@
package org.jboss.seam.wicket.ioc;
import java.io.File;
-import java.util.ArrayList;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import javassist.ClassPool;
-import javassist.CtClass;
import javassist.LoaderClassPath;
import org.apache.tools.ant.Task;
@@ -73,7 +70,7 @@
ClassPool classPool = new ClassPool();
classPool.insertClassPath(new LoaderClassPath(getProject().createClassLoader(buildPath)));
- List<CtClass> instrumentedClasses = new ArrayList<CtClass>();
+ //List<CtClass> instrumentedClasses = new ArrayList<CtClass>();
JavassistInstrumentor instrumentor = new JavassistInstrumentor(classPool,useAnnotations);
14 years
Seam SVN: r13910 - in branches/community/Seam_2_2/src/test: unit/org/jboss/seam/test/unit and 1 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-11-16 05:31:03 -0500 (Tue, 16 Nov 2010)
New Revision: 13910
Modified:
branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/ConcurrentFactoryTest.java
branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/PageParamTest.java
branches/community/Seam_2_2/src/test/unit/org/jboss/seam/test/unit/RemotingTest.java
branches/community/Seam_2_2/src/test/unit/org/jboss/seam/test/unit/web/ConditionalRequestTest.java
Log:
sorted out some compiler warnings
Modified: branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/ConcurrentFactoryTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/ConcurrentFactoryTest.java 2010-11-16 10:29:14 UTC (rev 13909)
+++ branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/ConcurrentFactoryTest.java 2010-11-16 10:31:03 UTC (rev 13910)
@@ -1,18 +1,15 @@
package org.jboss.seam.test.integration;
-import org.jboss.seam.ScopeType;
+import static org.jboss.seam.ScopeType.APPLICATION;
+
import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.core.Init;
import org.jboss.seam.mock.SeamTest;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
-import static org.jboss.seam.ScopeType.APPLICATION;
-
public class ConcurrentFactoryTest
extends SeamTest
{
Modified: branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/PageParamTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/PageParamTest.java 2010-11-16 10:29:14 UTC (rev 13909)
+++ branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/PageParamTest.java 2010-11-16 10:31:03 UTC (rev 13910)
@@ -1,10 +1,11 @@
package org.jboss.seam.test.integration;
+import java.util.List;
+
+import javax.faces.application.FacesMessage;
+
import org.jboss.seam.mock.SeamTest;
import org.testng.annotations.Test;
-import javax.faces.validator.ValidatorException;
-import javax.faces.application.FacesMessage;
-import java.util.List;
/**
* @author Pete Muir
Modified: branches/community/Seam_2_2/src/test/unit/org/jboss/seam/test/unit/RemotingTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/unit/org/jboss/seam/test/unit/RemotingTest.java 2010-11-16 10:29:14 UTC (rev 13909)
+++ branches/community/Seam_2_2/src/test/unit/org/jboss/seam/test/unit/RemotingTest.java 2010-11-16 10:31:03 UTC (rev 13910)
@@ -15,6 +15,8 @@
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Type;
+import java.math.BigDecimal;
+import java.math.BigInteger;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
@@ -22,7 +24,6 @@
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Queue;
@@ -38,6 +39,7 @@
import org.jboss.seam.mock.MockServletContext;
import org.jboss.seam.remoting.Call;
import org.jboss.seam.remoting.CallContext;
+import org.jboss.seam.remoting.InterfaceGenerator;
import org.jboss.seam.remoting.MarshalUtils;
import org.jboss.seam.remoting.client.ParserUtils;
import org.jboss.seam.remoting.wrapper.BagWrapper;
@@ -53,10 +55,6 @@
import org.jboss.seam.remoting.wrapper.StringWrapper;
import org.jboss.seam.remoting.wrapper.WrapperFactory;
import org.testng.annotations.Test;
-import org.w3c.dom.Node;
-import org.jboss.seam.remoting.InterfaceGenerator;
-import java.math.BigInteger;
-import java.math.BigDecimal;
/**
* Unit tests for Seam Remoting
@@ -381,6 +379,7 @@
@SuppressWarnings("serial")
private class InvalidList<E> extends ArrayList<E>
{
+ @SuppressWarnings("unused")
public InvalidList()
{
throw new InstantiationError();
@@ -539,6 +538,7 @@
@SuppressWarnings("serial")
private class InvalidMap extends HashMap
{
+ @SuppressWarnings("unused")
public InvalidMap()
{
throw new InstantiationError();
Modified: branches/community/Seam_2_2/src/test/unit/org/jboss/seam/test/unit/web/ConditionalRequestTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/unit/org/jboss/seam/test/unit/web/ConditionalRequestTest.java 2010-11-16 10:29:14 UTC (rev 13909)
+++ branches/community/Seam_2_2/src/test/unit/org/jboss/seam/test/unit/web/ConditionalRequestTest.java 2010-11-16 10:31:03 UTC (rev 13910)
@@ -1,20 +1,21 @@
package org.jboss.seam.test.unit.web;
-import org.testng.annotations.Test;
-import org.testng.Assert;
import static org.testng.Assert.assertEquals;
-import org.jboss.seam.mock.MockHttpSession;
+
+import java.io.IOException;
+import java.util.Date;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
import org.jboss.seam.mock.EnhancedMockHttpServletRequest;
import org.jboss.seam.mock.EnhancedMockHttpServletResponse;
+import org.jboss.seam.mock.MockHttpSession;
import org.jboss.seam.web.ConditionalAbstractResource;
+import org.testng.annotations.Test;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletException;
-import java.io.IOException;
-import java.util.Date;
-
/**
* @author Christian Bauer
*
14 years
Seam SVN: r13909 - in branches/community/Seam_2_2/src/main/org/jboss/seam: drools and 12 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-11-16 05:29:14 -0500 (Tue, 16 Nov 2010)
New Revision: 13909
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/Model.java
branches/community/Seam_2_2/src/main/org/jboss/seam/drools/RuleBase.java
branches/community/Seam_2_2/src/main/org/jboss/seam/framework/HibernateEntityController.java
branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java
branches/community/Seam_2_2/src/main/org/jboss/seam/init/NamespacePackageResolver.java
branches/community/Seam_2_2/src/main/org/jboss/seam/international/Messages.java
branches/community/Seam_2_2/src/main/org/jboss/seam/international/StatusMessages.java
branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/JBossClusterMonitor.java
branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/JMXInvocationHandler.java
branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/MBeanProxy.java
branches/community/Seam_2_2/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
branches/community/Seam_2_2/src/main/org/jboss/seam/log/LogImpl.java
branches/community/Seam_2_2/src/main/org/jboss/seam/mock/DelegatingServletInputStream.java
branches/community/Seam_2_2/src/main/org/jboss/seam/navigation/Pages.java
branches/community/Seam_2_2/src/main/org/jboss/seam/security/SecurityInterceptor.java
branches/community/Seam_2_2/src/main/org/jboss/seam/security/digest/DigestRequest.java
branches/community/Seam_2_2/src/main/org/jboss/seam/util/ProxyFactory.java
branches/community/Seam_2_2/src/main/org/jboss/seam/web/AbstractResource.java
branches/community/Seam_2_2/src/main/org/jboss/seam/web/AuthenticationFilter.java
branches/community/Seam_2_2/src/main/org/jboss/seam/web/WicketFilter.java
Log:
sorted out some compiler warnings
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/Model.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/Model.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/Model.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -26,6 +26,7 @@
return beanClass;
}
+ @SuppressWarnings("deprecation")
public static Model forClass(Class clazz)
{
if ( !Contexts.isApplicationContextActive() )
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/drools/RuleBase.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/drools/RuleBase.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/drools/RuleBase.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -1,6 +1,5 @@
package org.jboss.seam.drools;
-import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
@@ -17,8 +16,8 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Unwrap;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.ResourceLoader;
import org.jboss.seam.core.Expressions.ValueExpression;
+import org.jboss.seam.core.ResourceLoader;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/framework/HibernateEntityController.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/framework/HibernateEntityController.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/framework/HibernateEntityController.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -68,6 +68,7 @@
getSession().flush();
}
+ @SuppressWarnings("deprecation")
protected <T> T get(Class<T> clazz, Serializable id, LockMode lockMode) throws HibernateException
{
return (T) getSession().get(clazz, id, lockMode);
@@ -83,6 +84,7 @@
return getSession().getNamedQuery(name);
}
+ @SuppressWarnings("deprecation")
protected <T> T load(Class<T> clazz, Serializable id, LockMode lockMode) throws HibernateException
{
return (T) getSession().load(clazz, id, lockMode);
@@ -93,6 +95,7 @@
return (T) getSession().load(clazz, id);
}
+ @SuppressWarnings("deprecation")
protected void lock(Object entity, LockMode lockMode) throws HibernateException
{
getSession().lock(entity, lockMode);
@@ -108,6 +111,7 @@
getSession().persist(entity);
}
+ @SuppressWarnings("deprecation")
protected void refresh(Object entity, LockMode lockMode) throws HibernateException
{
getSession().refresh(entity, lockMode);
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -23,8 +23,6 @@
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.ReentrantLock;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -61,7 +59,6 @@
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.servlet.ServletApplicationMap;
import org.jboss.seam.util.Conversions;
import org.jboss.seam.util.Naming;
import org.jboss.seam.util.Reflections;
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/init/NamespacePackageResolver.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/init/NamespacePackageResolver.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/init/NamespacePackageResolver.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -18,7 +18,8 @@
public class NamespacePackageResolver {
private static final String JAVA_SCHEME = "java";
- private static final LogProvider log =
+ @SuppressWarnings("unused")
+ private static final LogProvider log =
Logging.getLogProvider(NamespacePackageResolver.class);
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/international/Messages.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/international/Messages.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/international/Messages.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -18,7 +18,6 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Interpolator;
import org.jboss.seam.core.SeamResourceBundle;
/**
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/international/StatusMessages.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/international/StatusMessages.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/international/StatusMessages.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -11,8 +11,6 @@
import org.hibernate.validator.InvalidValue;
import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.international.StatusMessage.Severity;
/**
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/JBossClusterMonitor.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/JBossClusterMonitor.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/JBossClusterMonitor.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -3,7 +3,6 @@
import static org.jboss.seam.ScopeType.APPLICATION;
import static org.jboss.seam.annotations.Install.BUILT_IN;
-import java.util.Iterator;
import java.util.Vector;
import javax.management.MBeanServer;
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/JMXInvocationHandler.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/JMXInvocationHandler.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/JMXInvocationHandler.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -330,7 +330,7 @@
// Object overrides ----------------------------------------------
-
+ @Override
public String toString()
{
return "MBeanProxy for " + objectName + " (Agent ID: " + AgentID.get(server) + ")";
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/MBeanProxy.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/MBeanProxy.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/jmx/MBeanProxy.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -30,7 +30,7 @@
*/
public static Object get(Class intrface, ObjectName name, String agentID) throws MBeanProxyCreationException
{
- return get(intrface, name, (MBeanServer)MBeanServerFactory.findMBeanServer(agentID).get(0));
+ return get(intrface, name, MBeanServerFactory.findMBeanServer(agentID).get(0));
}
/**
@@ -78,7 +78,7 @@
*/
public static Object create(Class instance, Class intrface, ObjectName name, String agentID) throws MBeanProxyCreationException
{
- return create(instance, intrface, name, (MBeanServer)MBeanServerFactory.findMBeanServer(agentID).get(0));
+ return create(instance, intrface, name, MBeanServerFactory.findMBeanServer(agentID).get(0));
}
/**
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -37,7 +37,6 @@
import org.jboss.seam.faces.FacesPage;
import org.jboss.seam.faces.Switcher;
import org.jboss.seam.faces.Validation;
-import org.jboss.seam.international.StatusMessage;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.navigation.Pages;
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/log/LogImpl.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/log/LogImpl.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/log/LogImpl.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -136,6 +136,7 @@
}
}
+ @SuppressWarnings("finally")
private Object interpolate(Object object, Object... params)
{
if (object instanceof String)
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/mock/DelegatingServletInputStream.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/mock/DelegatingServletInputStream.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/mock/DelegatingServletInputStream.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -55,11 +55,13 @@
}
+ @Override
public int read() throws IOException
{
return this.sourceStream.read();
}
+ @Override
public void close() throws IOException
{
super.close();
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/navigation/Pages.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/navigation/Pages.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -670,6 +670,7 @@
/**
* Call the action requested by s:link or s:button.
*/
+ @SuppressWarnings("deprecation")
private static boolean callAction(FacesContext facesContext)
{
//TODO: refactor with Pages.instance().callAction()!!
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/security/SecurityInterceptor.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/security/SecurityInterceptor.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/security/SecurityInterceptor.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -244,7 +244,6 @@
Object target = valueMethod.invoke(annotation);
if (!target.equals(void.class))
{
- if (restriction == null) restriction = new Restriction();
restriction.addMethodRestriction(target,
getPermissionAction(permissionCheck, annotation));
}
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/security/digest/DigestRequest.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/security/digest/DigestRequest.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/security/digest/DigestRequest.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -171,11 +171,7 @@
}
- String nonceAsText = new String(Base64.decode(nonce));
- if (nonceAsText == null)
- {
- throw new DigestValidationException("Nonce is not Base64 encoded - nonce received: " + nonce);
- }
+ String nonceAsText = new String(Base64.decode(nonce));
String[] nonceTokens = nonceAsText.split(":");
if (nonceTokens.length != 2)
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/util/ProxyFactory.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/util/ProxyFactory.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/util/ProxyFactory.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -199,9 +199,11 @@
proxyClass = null;
}
- public int hashCode() { return hash; }
+ @Override
+ public int hashCode() { return hash; }
- public boolean equals(Object obj) {
+ @Override
+ public boolean equals(Object obj) {
if (obj instanceof CacheKey) {
CacheKey target = (CacheKey)obj;
return target.filter == filter && target.handler == handler
@@ -561,7 +563,7 @@
cf.addField(finfo3);
HashMap allMethods = getMethods(superClass, interfaces);
- int size = allMethods.size();
+ //int size = allMethods.size();
makeConstructors(classname, cf, pool, classname);
int s = overrideMethods(cf, pool, classname, allMethods);
addMethodsHolder(cf, pool, classname, s);
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/web/AbstractResource.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/web/AbstractResource.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/web/AbstractResource.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -1,14 +1,15 @@
package org.jboss.seam.web;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.zip.GZIPOutputStream;
+
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.zip.GZIPOutputStream;
/**
* Superclass of Seam components that serve up
@@ -114,6 +115,7 @@
gzipStream = new GZIPOutputStream(byteStream);
}
+ @Override
public void close() throws IOException
{
if (closed)
@@ -132,6 +134,7 @@
closed = true;
}
+ @Override
public void flush() throws IOException
{
if (closed)
@@ -141,6 +144,7 @@
gzipStream.flush();
}
+ @Override
public void write(int b) throws IOException
{
if (closed)
@@ -150,11 +154,13 @@
gzipStream.write((byte) b);
}
+ @Override
public void write(byte b[]) throws IOException
{
write(b, 0, b.length);
}
+ @Override
public void write(byte b[], int off, int len) throws IOException
{
if (closed)
@@ -164,11 +170,13 @@
gzipStream.write(b, off, len);
}
+ @SuppressWarnings("unused")
public boolean closed()
{
return (this.closed);
}
+ @SuppressWarnings("unused")
public void reset()
{
// noop
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/web/AuthenticationFilter.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/web/AuthenticationFilter.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/web/AuthenticationFilter.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -21,8 +21,6 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.annotations.web.Filter;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.SessionContext;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.Credentials;
import org.jboss.seam.security.Identity;
@@ -31,7 +29,6 @@
import org.jboss.seam.security.digest.DigestUtils;
import org.jboss.seam.security.digest.DigestValidationException;
import org.jboss.seam.servlet.ContextualHttpServletRequest;
-import org.jboss.seam.servlet.ServletRequestSessionMap;
import org.jboss.seam.util.Base64;
/**
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/web/WicketFilter.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/web/WicketFilter.java 2010-11-16 10:26:15 UTC (rev 13908)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/web/WicketFilter.java 2010-11-16 10:29:14 UTC (rev 13909)
@@ -23,7 +23,6 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.ServletLifecycle;
import org.jboss.seam.core.Init;
import org.jboss.seam.deployment.HotDeploymentStrategy;
14 years
Seam SVN: r13908 - branches/community/Seam_2_2/src/main/org/jboss/seam/persistence.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-11-16 05:26:15 -0500 (Tue, 16 Nov 2010)
New Revision: 13908
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java
branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java
branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernateSessionProxy.java
Log:
JBPAPP-4714 changed Hibernate delegate handlers
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java 2010-11-08 15:30:48 UTC (rev 13907)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java 2010-11-16 10:26:15 UTC (rev 13908)
@@ -1,7 +1,6 @@
package org.jboss.seam.persistence;
import static org.jboss.seam.annotations.Install.FRAMEWORK;
-import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.Collection;
@@ -18,11 +17,12 @@
import org.hibernate.TransientObjectException;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.proxy.HibernateProxy;
+import org.hibernate.search.FullTextSession;
import org.hibernate.type.VersionType;
import org.jboss.seam.Component;
import org.jboss.seam.Entity;
+import org.jboss.seam.Entity.NotEntityException;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.Entity.NotEntityException;
import org.jboss.seam.annotations.FlushModeType;
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
@@ -122,7 +122,7 @@
{
return (Session) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
new Class[] { HibernateSessionProxy.class },
- new HibernateSessionInvocationHandler(session));
+ new HibernateSessionInvocationHandler(session, (FullTextSession) session) );
}
}
else
@@ -136,7 +136,7 @@
else {
return (Session) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
new Class[] { FULL_TEXT_SESSION_PROXY_CLASS },
- new HibernateSessionInvocationHandler((Session) FULL_TEXT_SESSION_CONSTRUCTOR.invoke(null, session)));
+ new HibernateSessionInvocationHandler( session, (FullTextSession) FULL_TEXT_SESSION_CONSTRUCTOR.invoke(null, session) ) );
}
}
catch(Exception e) {
@@ -148,7 +148,7 @@
else {
return (Session) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
new Class[] { HibernateSessionProxy.class },
- new HibernateSessionInvocationHandler(session));
+ new HibernateSessionInvocationHandler( session, null) );
}
}
}
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java 2010-11-08 15:30:48 UTC (rev 13907)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java 2010-11-16 10:26:15 UTC (rev 13908)
@@ -4,9 +4,51 @@
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.lang.reflect.TypeVariable;
+import java.sql.Connection;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.hibernate.CacheMode;
+import org.hibernate.Criteria;
+import org.hibernate.EntityMode;
+import org.hibernate.Filter;
+import org.hibernate.FlushMode;
+import org.hibernate.HibernateException;
+import org.hibernate.Interceptor;
+import org.hibernate.LockMode;
import org.hibernate.Query;
+import org.hibernate.ReplicationMode;
+import org.hibernate.SQLQuery;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.collection.PersistentCollection;
+import org.hibernate.engine.ActionQueue;
+import org.hibernate.engine.EntityEntry;
+import org.hibernate.engine.EntityKey;
+import org.hibernate.engine.PersistenceContext;
+import org.hibernate.engine.QueryParameters;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.engine.SessionImplementor;
+import org.hibernate.engine.query.sql.NativeSQLQuerySpecification;
+import org.hibernate.event.EventListeners;
+import org.hibernate.event.EventSource;
+import org.hibernate.impl.CriteriaImpl;
+import org.hibernate.jdbc.Batcher;
+import org.hibernate.jdbc.JDBCContext;
+import org.hibernate.jdbc.Work;
+import org.hibernate.loader.custom.CustomQuery;
+import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.search.FullTextSession;
+import org.hibernate.stat.SessionStatistics;
+import org.hibernate.type.Type;
/**
* InvocationHandler that proxies the Session, and implements EL interpolation
@@ -16,18 +58,78 @@
* @author Gavin King
* @author Emmanuel Bernard
* @author Mike Youngstrom
+ * @author Marek Novotny
*
*/
-public class HibernateSessionInvocationHandler implements InvocationHandler, Serializable
+public class HibernateSessionInvocationHandler implements InvocationHandler, Serializable, EventSource
{
+ private FullTextSession ftDelegate;
private Session delegate;
- public HibernateSessionInvocationHandler(Session delegate)
+ private Map<String, Method> eventSourceMethods = new HashMap<String, Method>();
+
+ public HibernateSessionInvocationHandler(Session paramDelegate, FullTextSession searchDelegate)
{
- this.delegate = delegate;
+ this.ftDelegate = searchDelegate;
+ this.delegate = paramDelegate;
+ buildEventSourceMethodMetadata();
}
+ private void buildEventSourceMethodMetadata(){
+ Method[] methods = EventSource.class.getDeclaredMethods();
+ for (Method declaredMethod : methods)
+ {
+ eventSourceMethods.put(declaredMethod.getName(), declaredMethod);
+ }
+ }
+
+ /**
+ * Get the proper delegate based on {@link org.hibernate.event.EventSource}
+ * or {@link org.hibernate.search.FullTextSession}
+ *
+ * @param method
+ * @return proper delegate based on {@link org.hibernate.event.EventSource}
+ * or {@link org.hibernate.search.FullTextSession}
+ */
+ Object getDelegate(Method method)
+ {
+ if (isPureEventSourceMethod(method))
+ {
+ return delegate;
+ }
+ else
+ {
+ return ftDelegate;
+ }
+ }
+
+ /**
+ * Detects if Method is hosted on EventSource and *not* any of its interfaces
+ * if true returns true otherwise return false
+ *
+ * @param method
+ * @return true if it is on declared on
+ * {@link org.hibernate.event.EventSource} otherwise return false
+ */
+ boolean isPureEventSourceMethod(Method method)
+ {
+ if ( eventSourceMethods.containsKey(method.getName()))
+ {
+ Method declMethod = eventSourceMethods.get(method);
+ if (declMethod != null)
+ {
+ TypeVariable<Method>[] pars = declMethod.getTypeParameters();
+ if (Arrays.equals(method.getTypeParameters(), pars))
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
{
try
@@ -40,7 +142,7 @@
{
return handleReconnectNoArg(method);
}
- return method.invoke(delegate, args);
+ return method.invoke(getDelegate(method), args);
}
catch (InvocationTargetException e)
{
@@ -52,7 +154,7 @@
{
if (args[0] == null)
{
- return method.invoke(delegate, args);
+ return method.invoke(getDelegate(method), args);
}
String ejbql = (String) args[0];
if (ejbql.indexOf('#') > 0)
@@ -60,7 +162,7 @@
QueryParser qp = new QueryParser(ejbql);
Object[] newArgs = args.clone();
newArgs[0] = qp.getEjbql();
- Query query = (Query) method.invoke(delegate, newArgs);
+ Query query = (Query) method.invoke(getDelegate(method), newArgs);
for (int i = 0; i < qp.getParameterValueBindings().size(); i++)
{
query.setParameter(QueryParser.getParameterName(i), qp.getParameterValueBindings().get(i).getValue());
@@ -69,7 +171,7 @@
}
else
{
- return method.invoke(delegate, args);
+ return method.invoke(getDelegate(method), args);
}
}
@@ -77,4 +179,627 @@
{
throw new UnsupportedOperationException("deprecated");
}
+
+ public Interceptor getInterceptor()
+ {
+ return ((SessionImplementor) ftDelegate).getInterceptor();
+ }
+
+ public void setAutoClear(boolean paramBoolean)
+ {
+ ((SessionImplementor) ftDelegate).setAutoClear(paramBoolean);
+ }
+
+ public boolean isTransactionInProgress()
+ {
+ return ((SessionImplementor) ftDelegate).isTransactionInProgress();
+ }
+
+ public void initializeCollection(PersistentCollection paramPersistentCollection, boolean paramBoolean) throws HibernateException
+ {
+ ((SessionImplementor) ftDelegate).initializeCollection(paramPersistentCollection, paramBoolean);
+ }
+
+ public Object internalLoad(String paramString, Serializable paramSerializable, boolean paramBoolean1, boolean paramBoolean2) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).internalLoad(paramString, paramSerializable, paramBoolean1, paramBoolean2);
+ }
+
+ public Object immediateLoad(String paramString, Serializable paramSerializable) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).immediateLoad(paramString, paramSerializable);
+ }
+
+ public long getTimestamp()
+ {
+ return ((SessionImplementor) ftDelegate).getTimestamp();
+ }
+
+ public SessionFactoryImplementor getFactory()
+ {
+ return ((SessionImplementor) ftDelegate).getFactory();
+ }
+
+ public Batcher getBatcher()
+ {
+ return ((SessionImplementor) ftDelegate).getBatcher();
+ }
+
+ public List list(String paramString, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).list(paramString, paramQueryParameters);
+ }
+
+ public Iterator iterate(String paramString, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).iterate(paramString, paramQueryParameters);
+ }
+
+ public ScrollableResults scroll(String paramString, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).scroll(paramString, paramQueryParameters);
+ }
+
+ public ScrollableResults scroll(CriteriaImpl paramCriteriaImpl, ScrollMode paramScrollMode)
+ {
+ return ((SessionImplementor) ftDelegate).scroll(paramCriteriaImpl, paramScrollMode);
+ }
+
+ public List list(CriteriaImpl paramCriteriaImpl)
+ {
+ return ((SessionImplementor) ftDelegate).list(paramCriteriaImpl);
+ }
+
+ public List listFilter(Object paramObject, String paramString, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).listFilter(paramObject, paramString, paramQueryParameters);
+ }
+
+ public Iterator iterateFilter(Object paramObject, String paramString, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).iterateFilter(paramObject, paramString, paramQueryParameters);
+ }
+
+ public EntityPersister getEntityPersister(String paramString, Object paramObject) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).getEntityPersister(paramString, paramObject);
+ }
+
+ public Object getEntityUsingInterceptor(EntityKey paramEntityKey) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).getEntityUsingInterceptor(paramEntityKey);
+ }
+
+ public void afterTransactionCompletion(boolean paramBoolean, Transaction paramTransaction)
+ {
+ ((SessionImplementor) ftDelegate).afterTransactionCompletion(paramBoolean, paramTransaction);
+ }
+
+ public void beforeTransactionCompletion(Transaction paramTransaction)
+ {
+ ((SessionImplementor) ftDelegate).beforeTransactionCompletion(paramTransaction) ;
+ }
+
+ public Serializable getContextEntityIdentifier(Object paramObject)
+ {
+ return ((SessionImplementor) ftDelegate).getContextEntityIdentifier(paramObject);
+ }
+
+ public String bestGuessEntityName(Object paramObject)
+ {
+ return ((SessionImplementor) ftDelegate).bestGuessEntityName(paramObject);
+ }
+
+ public String guessEntityName(Object paramObject) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).guessEntityName(paramObject);
+ }
+
+ public Object instantiate(String paramString, Serializable paramSerializable) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).instantiate(paramString, paramSerializable);
+ }
+
+ public List listCustomQuery(CustomQuery paramCustomQuery, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).listCustomQuery(paramCustomQuery, paramQueryParameters);
+ }
+
+ public ScrollableResults scrollCustomQuery(CustomQuery paramCustomQuery, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).scrollCustomQuery(paramCustomQuery, paramQueryParameters);
+ }
+
+ public List list(NativeSQLQuerySpecification paramNativeSQLQuerySpecification, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).list(paramNativeSQLQuerySpecification, paramQueryParameters);
+ }
+
+ public ScrollableResults scroll(NativeSQLQuerySpecification paramNativeSQLQuerySpecification, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).scroll(paramNativeSQLQuerySpecification, paramQueryParameters);
+ }
+
+ public Object getFilterParameterValue(String paramString)
+ {
+ return ((SessionImplementor) ftDelegate).getFilterParameterValue(paramString);
+ }
+
+ public Type getFilterParameterType(String paramString)
+ {
+ return ((SessionImplementor) ftDelegate).getFilterParameterType(paramString);
+ }
+
+ public Map getEnabledFilters()
+ {
+ return ((SessionImplementor) ftDelegate).getEnabledFilters();
+ }
+
+ public int getDontFlushFromFind()
+ {
+ return ((SessionImplementor) ftDelegate).getDontFlushFromFind();
+ }
+
+ public EventListeners getListeners()
+ {
+ return ((SessionImplementor) ftDelegate).getListeners();
+ }
+
+ public PersistenceContext getPersistenceContext()
+ {
+ return ((SessionImplementor) ftDelegate).getPersistenceContext();
+ }
+
+ public int executeUpdate(String paramString, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).executeUpdate(paramString, paramQueryParameters);
+ }
+
+ public int executeNativeUpdate(NativeSQLQuerySpecification paramNativeSQLQuerySpecification, QueryParameters paramQueryParameters) throws HibernateException
+ {
+ return ((SessionImplementor) ftDelegate).executeNativeUpdate(paramNativeSQLQuerySpecification, paramQueryParameters);
+ }
+
+
+ public EntityMode getEntityMode()
+ {
+ return ((SessionImplementor) ftDelegate).getEntityMode();
+ }
+
+ public CacheMode getCacheMode()
+ {
+ return ((SessionImplementor) ftDelegate).getCacheMode();
+ }
+
+ public void setCacheMode(CacheMode paramCacheMode)
+ {
+ ((SessionImplementor) ftDelegate).setCacheMode(paramCacheMode);
+ }
+
+ public boolean isOpen()
+ {
+ return ((SessionImplementor) ftDelegate).isOpen();
+ }
+
+ public boolean isConnected()
+ {
+ return ((SessionImplementor) ftDelegate).isConnected();
+ }
+
+ public FlushMode getFlushMode()
+ {
+ return ((SessionImplementor) ftDelegate).getFlushMode();
+ }
+
+ public void setFlushMode(FlushMode paramFlushMode)
+ {
+ ((SessionImplementor) ftDelegate).setFlushMode(paramFlushMode);
+ }
+
+ public Connection connection()
+ {
+ return ((SessionImplementor) ftDelegate).connection();
+ }
+
+ public void flush()
+ {
+ ((SessionImplementor) ftDelegate).flush();
+ }
+
+ public Query getNamedQuery(String paramString)
+ {
+ return ((SessionImplementor) ftDelegate).getNamedQuery(paramString);
+ }
+
+ public Query getNamedSQLQuery(String paramString)
+ {
+ return ((SessionImplementor) ftDelegate).getNamedSQLQuery(paramString);
+ }
+
+ public boolean isEventSource()
+ {
+ return ((SessionImplementor) ftDelegate).isEventSource();
+ }
+
+ public void afterScrollOperation()
+ {
+ ((SessionImplementor) ftDelegate).afterScrollOperation();
+ }
+
+ public String getFetchProfile()
+ {
+ return ((SessionImplementor) ftDelegate).getFetchProfile();
+ }
+
+ public void setFetchProfile(String paramString)
+ {
+ ((SessionImplementor) ftDelegate).setFetchProfile(paramString);
+ }
+
+ public JDBCContext getJDBCContext()
+ {
+ return ((SessionImplementor) ftDelegate).getJDBCContext();
+ }
+
+ public boolean isClosed()
+ {
+ return ((SessionImplementor) ftDelegate).isClosed();
+ }
+
+ public Session getSession(EntityMode paramEntityMode)
+ {
+ return ftDelegate.getSession(paramEntityMode);
+ }
+
+ public SessionFactory getSessionFactory()
+ {
+ return ftDelegate.getSessionFactory();
+ }
+
+ public Connection close() throws HibernateException
+ {
+ return ftDelegate.close();
+ }
+
+ public void cancelQuery() throws HibernateException
+ {
+ ftDelegate.cancelQuery();
+ }
+
+ public boolean isDirty() throws HibernateException
+ {
+ return ftDelegate.isDirty();
+ }
+
+ public boolean isDefaultReadOnly()
+ {
+ return ((HibernateSessionInvocationHandler) ftDelegate).isDefaultReadOnly();
+ }
+
+ public void setDefaultReadOnly(boolean paramBoolean)
+ {
+ ((HibernateSessionInvocationHandler) ftDelegate).setDefaultReadOnly(paramBoolean);
+ }
+
+ public Serializable getIdentifier(Object paramObject) throws HibernateException
+ {
+ return ftDelegate.getIdentifier(paramObject);
+ }
+
+ public boolean contains(Object paramObject)
+ {
+ return ftDelegate.contains(paramObject);
+ }
+
+ public void evict(Object paramObject) throws HibernateException
+ {
+ ftDelegate.evict(paramObject);
+ }
+
+ public Object load(Class paramClass, Serializable paramSerializable, LockMode paramLockMode) throws HibernateException
+ {
+ return ftDelegate.load(paramClass, paramSerializable, paramLockMode);
+ }
+
+ public Object load(String paramString, Serializable paramSerializable, LockMode paramLockMode) throws HibernateException
+ {
+ return ftDelegate.load(paramString, paramSerializable, paramLockMode);
+ }
+
+ public Object load(Class paramClass, Serializable paramSerializable) throws HibernateException
+ {
+ return ftDelegate.load(paramClass, paramSerializable);
+ }
+
+ public Object load(String paramString, Serializable paramSerializable) throws HibernateException
+ {
+ return ftDelegate.load(paramString, paramSerializable);
+ }
+
+ public void load(Object paramObject, Serializable paramSerializable) throws HibernateException
+ {
+ ftDelegate.load(paramObject, paramSerializable);
+ }
+
+ public void replicate(Object paramObject, ReplicationMode paramReplicationMode) throws HibernateException
+ {
+ ftDelegate.replicate(paramObject, paramReplicationMode);
+ }
+
+ public void replicate(String paramString, Object paramObject, ReplicationMode paramReplicationMode) throws HibernateException
+ {
+ ftDelegate.replicate(paramString, paramObject, paramReplicationMode);
+ }
+
+ public Serializable save(Object paramObject) throws HibernateException
+ {
+ return ftDelegate.save(paramObject);
+ }
+
+ public Serializable save(String paramString, Object paramObject) throws HibernateException
+ {
+ return ftDelegate.save(paramString, paramObject);
+ }
+
+ public void saveOrUpdate(Object paramObject) throws HibernateException
+ {
+ ftDelegate.saveOrUpdate(paramObject);
+ }
+
+ public void saveOrUpdate(String paramString, Object paramObject) throws HibernateException
+ {
+ ftDelegate.saveOrUpdate(paramString, paramObject);
+ }
+
+ public void update(Object paramObject) throws HibernateException
+ {
+ ftDelegate.update(paramObject);
+ }
+
+ public void update(String paramString, Object paramObject) throws HibernateException
+ {
+ ftDelegate.update(paramString, paramObject);
+ }
+
+ public Object merge(Object paramObject) throws HibernateException
+ {
+ return ftDelegate.merge(paramObject);
+ }
+
+ public Object merge(String paramString, Object paramObject) throws HibernateException
+ {
+ return ftDelegate.merge(paramString, paramObject);
+ }
+
+ public void persist(Object paramObject) throws HibernateException
+ {
+ ftDelegate.persist(paramObject);
+ }
+
+ public void persist(String paramString, Object paramObject) throws HibernateException
+ {
+ ftDelegate.persist(paramString, paramObject);
+ }
+
+ public void delete(Object paramObject) throws HibernateException
+ {
+ ftDelegate.delete(paramObject);
+ }
+
+ public void delete(String paramString, Object paramObject) throws HibernateException
+ {
+ ((EventSource) delegate).delete(paramString, paramObject);
+ }
+
+ public void lock(Object paramObject, LockMode paramLockMode) throws HibernateException
+ {
+ ftDelegate.lock(paramObject, paramLockMode);
+ }
+
+ public void lock(String paramString, Object paramObject, LockMode paramLockMode) throws HibernateException
+ {
+ ftDelegate.lock(paramString, paramObject, paramLockMode);
+ }
+
+ public void refresh(Object paramObject) throws HibernateException
+ {
+ ftDelegate.refresh(paramObject);
+ }
+
+ public void refresh(Object paramObject, LockMode paramLockMode) throws HibernateException
+ {
+ ftDelegate.refresh(paramObject, paramLockMode);
+ }
+
+ public LockMode getCurrentLockMode(Object paramObject) throws HibernateException
+ {
+ return ftDelegate.getCurrentLockMode(paramObject);
+ }
+
+ public Transaction beginTransaction() throws HibernateException
+ {
+ return ftDelegate.beginTransaction();
+ }
+
+ public Transaction getTransaction()
+ {
+ return ftDelegate.getTransaction();
+ }
+
+ public Criteria createCriteria(Class paramClass)
+ {
+ return ftDelegate.createCriteria(paramClass);
+ }
+
+ public Criteria createCriteria(Class paramClass, String paramString)
+ {
+ return ftDelegate.createCriteria(paramClass, paramString);
+ }
+
+ public Criteria createCriteria(String paramString)
+ {
+ return ftDelegate.createCriteria(paramString);
+ }
+
+ public Criteria createCriteria(String paramString1, String paramString2)
+ {
+ return ftDelegate.createCriteria(paramString1, paramString2);
+ }
+
+ public Query createQuery(String paramString) throws HibernateException
+ {
+ return ftDelegate.createQuery(paramString);
+ }
+
+ public SQLQuery createSQLQuery(String paramString) throws HibernateException
+ {
+ return ftDelegate.createSQLQuery(paramString);
+ }
+
+ public Query createFilter(Object paramObject, String paramString) throws HibernateException
+ {
+ return ftDelegate.createFilter(paramObject, paramString);
+ }
+
+ public void clear()
+ {
+ ftDelegate.clear();
+ }
+
+ public Object get(Class paramClass, Serializable paramSerializable) throws HibernateException
+ {
+ return ftDelegate.get(paramClass, paramSerializable);
+ }
+
+ public Object get(Class paramClass, Serializable paramSerializable, LockMode paramLockMode) throws HibernateException
+ {
+ return ftDelegate.get(paramClass, paramSerializable, paramLockMode);
+ }
+
+ public Object get(String paramString, Serializable paramSerializable) throws HibernateException
+ {
+ return ftDelegate.get(paramString, paramSerializable);
+ }
+
+ public Object get(String paramString, Serializable paramSerializable, LockMode paramLockMode) throws HibernateException
+ {
+ return ftDelegate.get(paramString, paramSerializable, paramLockMode);
+ }
+
+ public String getEntityName(Object paramObject) throws HibernateException
+ {
+ return ftDelegate.getEntityName(paramObject);
+ }
+
+ public Filter enableFilter(String paramString)
+ {
+ return ftDelegate.enableFilter(paramString);
+ }
+
+ public Filter getEnabledFilter(String paramString)
+ {
+ return ftDelegate.getEnabledFilter(paramString);
+ }
+
+ public void disableFilter(String paramString)
+ {
+ ftDelegate.disableFilter(paramString);
+ }
+
+ public SessionStatistics getStatistics()
+ {
+ return ftDelegate.getStatistics();
+ }
+
+ public boolean isReadOnly(Object paramObject)
+ {
+ return ((HibernateSessionInvocationHandler) ftDelegate).isReadOnly(paramObject);
+ }
+
+ public void setReadOnly(Object paramObject, boolean paramBoolean)
+ {
+ ftDelegate.setReadOnly(paramObject, paramBoolean);
+ }
+
+ public void doWork(Work paramWork) throws HibernateException
+ {
+ ftDelegate.doWork(paramWork);
+ }
+
+ public Connection disconnect() throws HibernateException
+ {
+ return ftDelegate.disconnect();
+ }
+
+ @SuppressWarnings("deprecation")
+ public void reconnect() throws HibernateException
+ {
+ ftDelegate.reconnect();
+ }
+
+ public void reconnect(Connection paramConnection) throws HibernateException
+ {
+ ftDelegate.reconnect(paramConnection);
+ }
+
+ public boolean isFetchProfileEnabled(String paramString)
+ {
+ return ((HibernateSessionInvocationHandler) ftDelegate).isFetchProfileEnabled(paramString);
+ }
+
+ public void enableFetchProfile(String paramString)
+ {
+ ((HibernateSessionInvocationHandler) ftDelegate).enableFetchProfile(paramString);
+ }
+
+ public void disableFetchProfile(String paramString)
+ {
+ ((HibernateSessionInvocationHandler) ftDelegate).disableFetchProfile(paramString);
+ }
+
+ public ActionQueue getActionQueue()
+ {
+ return ((EventSource) delegate).getActionQueue();
+ }
+
+ public Object instantiate(EntityPersister paramEntityPersister, Serializable paramSerializable) throws HibernateException
+ {
+ return ((EventSource) delegate).instantiate(paramEntityPersister, paramSerializable);
+ }
+
+ public void forceFlush(EntityEntry paramEntityEntry) throws HibernateException
+ {
+ ((EventSource) delegate).forceFlush(paramEntityEntry);
+ }
+
+ public void merge(String paramString, Object paramObject, Map paramMap) throws HibernateException
+ {
+ ((EventSource) delegate).merge(paramString, paramObject, paramMap);
+ }
+
+ public void persist(String paramString, Object paramObject, Map paramMap) throws HibernateException
+ {
+ ((EventSource) delegate).persist(paramString, paramObject, paramMap);
+ }
+
+ public void persistOnFlush(String paramString, Object paramObject, Map paramMap)
+ {
+ ((EventSource) delegate).persistOnFlush(paramString, paramObject, paramMap);
+ }
+
+ public void refresh(Object paramObject, Map paramMap) throws HibernateException
+ {
+ ((EventSource) delegate).refresh(paramObject, paramMap);
+ }
+
+ public void saveOrUpdateCopy(String paramString, Object paramObject, Map paramMap) throws HibernateException
+ {
+ ((EventSource) delegate).saveOrUpdateCopy(paramString, paramObject, paramMap);
+ }
+
+ public void delete(String paramString, Object paramObject, boolean paramBoolean, Set paramSet)
+ {
+ ((EventSource) delegate).delete(paramString, paramObject, paramBoolean, paramSet);
+ }
+
}
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernateSessionProxy.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernateSessionProxy.java 2010-11-08 15:30:48 UTC (rev 13907)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/persistence/HibernateSessionProxy.java 2010-11-16 10:26:15 UTC (rev 13908)
@@ -10,8 +10,7 @@
* previous HibernateSessionProxy.
*
* @author Gavin King
- * @author Emmanuel Bernard FIXME: EventSource should not really be there,
- * remove once HSearch is fixed
+ * @author Emmanuel Bernard
* @author Mike Youngstrom
*
*/
14 years
[seam/forge] 475bbb: Fixed dist coloring for eclipse (use -PcolorDisabl...
by noreply@github.com
Branch: refs/heads/master
Home: https://github.com/seam/forge
Commit: 475bbbaa4f1387cd2fd22974143973a6711fe301
https://github.com/seam/forge/commit/475bbbaa4f1387cd2fd22974143973a6711f...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2010-11-15 (Mon, 15 Nov 2010)
Changed paths:
M dist/pom.xml
M persistence-plugin/pom.xml
M persistence-plugin/src/main/java/org/jboss/seam/forge/persistence/PersistenceFacet.java
A persistence-plugin/src/main/resources/templates/DatasourceProducer.java
A persistence-plugin/src/main/resources/templates/PersistenceUtil.java
M shell/src/main/java/org/jboss/seam/forge/shell/plugins/builtin/ChangeDirectoryPlugin.java
Log Message:
-----------
Fixed dist coloring for eclipse (use -PcolorDisabled), added template DAO to PersistencePlugins. CDPlugin now CDs into resource files.
14 years
[seam/forge] 467ea7: beginning of new shell parser
by noreply@github.com
Branch: refs/heads/master
Home: https://github.com/seam/forge
Commit: 467ea7a5d0852532a6f2b80dd2d4c13f23db1ec0
https://github.com/seam/forge/commit/467ea7a5d0852532a6f2b80dd2d4c13f23db...
Author: Mike Brock <brockm(a)gmail.com>
Date: 2010-11-12 (Fri, 12 Nov 2010)
Changed paths:
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/FSHParser.java
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/LogicalStatement.java
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/NestedNode.java
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/Node.java
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/Parse.java
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/PipeNode.java
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/TokenNode.java
Log Message:
-----------
beginning of new shell parser
Commit: 91dd2cf8357915462bb891968bc668ae759318ae
https://github.com/seam/forge/commit/91dd2cf8357915462bb891968bc668ae7593...
Author: Mike Brock <brockm(a)gmail.com>
Date: 2010-11-13 (Sat, 13 Nov 2010)
Changed paths:
M shell/src/main/java/org/jboss/seam/forge/shell/Bootstrap.java
Log Message:
-----------
Merge branch 'master' of http://github.com/lincolnthree/seam-forge
Commit: b14525dac30b25ccc29e74f249058ed7bfcf3bf2
https://github.com/seam/forge/commit/b14525dac30b25ccc29e74f249058ed7bfcf...
Author: Mike Brock <brockm(a)gmail.com>
Date: 2010-11-13 (Sat, 13 Nov 2010)
Changed paths:
M shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java
M shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/FSHParser.java
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/FSHRuntime.java
M shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/LogicalStatement.java
M shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/Parse.java
A shell/src/main/java/org/jboss/seam/forge/shell/command/fshparser/ScriptNode.java
Log Message:
-----------
More work on the intermediate shell parser.
Commit: 4719cd32d37f6c1bd64290ef801bb3e37163e256
https://github.com/seam/forge/commit/4719cd32d37f6c1bd64290ef801bb3e37163...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2010-11-14 (Sun, 14 Nov 2010)
Changed paths:
M dist/pom.xml
M dist/src/main/assembly/bin/forge
M event-bus/pom.xml
M persistence-plugin/src/main/java/org/jboss/seam/forge/persistence/PersistenceFacet.java
M pom.xml
M project-model/pom.xml
M shell/pom.xml
M shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java
M shell/src/main/java/org/jboss/seam/forge/shell/plugins/builtin/NewProjectPlugin.java
M test-harness/pom.xml
M web-plugin/src/main/java/org/jboss/seam/forge/web/ServletFacet.java
Log Message:
-----------
Updated POMs to prevent leaky classpath w/test scope, colorized main shell prompt
Commit: a4886ae1216538fed0e35ce868a5b28b88968189
https://github.com/seam/forge/commit/a4886ae1216538fed0e35ce868a5b28b8896...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2010-11-14 (Sun, 14 Nov 2010)
Changed paths:
M dist/src/main/assembly/bin/forge
M persistence-plugin/src/main/java/org/jboss/seam/forge/persistence/PersistenceFacet.java
M persistence-plugin/src/main/java/org/jboss/seam/forge/persistence/plugins/NewFieldPlugin.java
M project-model/src/main/java/org/jboss/seam/forge/project/PackagingType.java
M project-model/src/main/java/org/jboss/seam/forge/project/dependencies/Dependency.java
M project-model/src/main/java/org/jboss/seam/forge/project/dependencies/DependencyBuilder.java
M project-model/src/main/java/org/jboss/seam/forge/project/dependencies/DependencyImpl.java
M project-model/src/main/java/org/jboss/seam/forge/project/dependencies/ExcludedDependencyBuilder.java
M project-model/src/main/java/org/jboss/seam/forge/project/dependencies/MavenDependencyAdapter.java
M project-model/src/main/java/org/jboss/seam/forge/project/dependencies/ScopeType.java
M project-model/src/test/java/org/jboss/seam/forge/project/dependencies/DependencyBuilderTest.java
M project-model/src/test/java/org/jboss/seam/forge/project/dependencies/MavenDependencyAdapterTest.java
M shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java
M shell/src/main/java/org/jboss/seam/forge/shell/command/ExecutionParser.java
M shell/src/main/java/org/jboss/seam/forge/shell/completer/PluginCommandCompleter.java
M shell/src/main/java/org/jboss/seam/forge/shell/plugins/builtin/LsJavaPlugin.java
Log Message:
-----------
Default comands are now hidden from command completer properly. ExecutionParser now directs input to default command if first keyword does not match another @Command. DependencyBuilder handles packaging types. PersistenceFacet installs correct dependency
Commit: a3d32e8a6937d0cbe8ba7d665af29ad6d503cc7e
https://github.com/seam/forge/commit/a3d32e8a6937d0cbe8ba7d665af29ad6d503...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2010-11-14 (Sun, 14 Nov 2010)
Changed paths:
M web-plugin/src/main/java/org/jboss/seam/forge/web/ServletFacet.java
Log Message:
-----------
ServletFacet now adds correct dependency type
14 years
[seam/forge] d6ff58: MavenContainer is now applicationscoped and only i...
by noreply@github.com
Branch: refs/heads/master
Home: https://github.com/seam/forge
Commit: d6ff58da4364354f7ee1ea73164db43baa53d1b2
https://github.com/seam/forge/commit/d6ff58da4364354f7ee1ea73164db43baa53...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2010-11-12 (Fri, 12 Nov 2010)
Changed paths:
M dist/pom.xml
M dist/src/main/assembly/bin/forge
M pom.xml
A project-model/src/main/java/org/jboss/seam/forge/project/facets/builtin/MavenContainer.java
M project-model/src/main/java/org/jboss/seam/forge/project/facets/builtin/MavenCoreFacetImpl.java
M project-model/src/main/java/org/jboss/seam/forge/project/locators/MavenProjectLocator.java
A shell/.swp
M shell/pom.xml
M shell/src/main/java/org/jboss/seam/forge/shell/Bootstrap.java
M shell/src/main/resources/log4j.xml
Log Message:
-----------
MavenContainer is now applicationscoped and only incurs the bootstrap cost once per shell. Shell bootstrap output has been sanitized.
14 years