Seam SVN: r14001 - branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2011-01-18 15:54:12 -0500 (Tue, 18 Jan 2011)
New Revision: 14001
Modified:
branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Controls.xml
Log:
JBSEAM-3917 updated documentation about added image/bmp type in <s:graphicImage/>
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Controls.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Controls.xml 2011-01-18 20:20:12 UTC (rev 14000)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Controls.xml 2011-01-18 20:54:12 UTC (rev 14001)
@@ -1334,8 +1334,8 @@
<literal>java.io.InputStream</literal> or a
<literal>java.net.URL</literal>. Currently supported image
formats are <literal>image/png</literal>,
- <literal>image/jpeg</literal> and
- <literal>image/gif</literal>.
+ <literal>image/jpeg</literal>, <literal>image/gif</literal> and
+ <literal>image/bmp</literal>.
</para>
</listitem>
<listitem>
13 years, 11 months
Seam SVN: r14000 - branches/community/Seam_2_2/examples/dvdstore/jboss6/src/com/jboss/dvd/seam.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2011-01-18 15:20:12 -0500 (Tue, 18 Jan 2011)
New Revision: 14000
Modified:
branches/community/Seam_2_2/examples/dvdstore/jboss6/src/com/jboss/dvd/seam/FullTextSearchAction.java
Log:
JBSEAM-4765
Modified: branches/community/Seam_2_2/examples/dvdstore/jboss6/src/com/jboss/dvd/seam/FullTextSearchAction.java
===================================================================
--- branches/community/Seam_2_2/examples/dvdstore/jboss6/src/com/jboss/dvd/seam/FullTextSearchAction.java 2011-01-18 14:13:56 UTC (rev 13999)
+++ branches/community/Seam_2_2/examples/dvdstore/jboss6/src/com/jboss/dvd/seam/FullTextSearchAction.java 2011-01-18 20:20:12 UTC (rev 14000)
@@ -135,12 +135,23 @@
@SuppressWarnings("unchecked")
private void updateResults() {
- FullTextQuery query = searchQuery(searchQuery);
+
+ javax.persistence.Query query = null;
+ if (searchQuery == null || searchQuery.isEmpty())
+ {
+ query = entityManager.createQuery("from Product");
+ numberOfResults =query.getResultList().size();
+ }
+ else
+ {
+ query = searchQuery(searchQuery);
+ numberOfResults =( (FullTextQuery) query).getResultSize();
+ }
+
List<Product> items = query
.setMaxResults(pageSize + 1)
.setFirstResult(pageSize * currentPage)
- .getResultList();
- numberOfResults = query.getResultSize();
+ .getResultList();
if (items.size() > pageSize) {
searchResults = new ArrayList(items.subList(0, pageSize));
13 years, 11 months
[seam/forge] 38ee7e: class modeling API
by noreply@github.com
Branch: refs/heads/master
Home: https://github.com/seam/forge
Commit: 38ee7e553da0421a90d93c49db8e34f6c645e572
https://github.com/seam/forge/commit/38ee7e553da0421a90d93c49db8e34f6c645...
Author: Mike Brock <brockm(a)gmail.com>
Date: 2011-01-17 (Mon, 17 Jan 2011)
Changed paths:
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/BeanModel.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/GeneratedAccessor.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/GeneratedJavaClass.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/GeneratedMetadata.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/Renderable.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/RenderUtil.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TClassType.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TConstructor.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TField.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TMember.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TMethod.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TParameter.java
A scaffold-plugin/src/main/resources/org/jboss/seam/forge/scaffold/templates/components/GeneratedAccessor.mvt
M scaffold-plugin/src/main/resources/org/jboss/seam/forge/scaffold/templates/fpak/bean.fpk
Log Message:
-----------
class modeling API
Commit: bc040d1e8d1e4fb734dd16c8c926e98700dc1226
https://github.com/seam/forge/commit/bc040d1e8d1e4fb734dd16c8c926e98700dc...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2011-01-17 (Mon, 17 Jan 2011)
Changed paths:
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/BeanModel.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/GeneratedAccessor.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/GeneratedJavaClass.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/GeneratedMetadata.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/Renderable.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/RenderUtil.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TClassType.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TConstructor.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TField.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TMember.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TMethod.java
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/meta/model/TParameter.java
A scaffold-plugin/src/main/resources/org/jboss/seam/forge/scaffold/templates/components/GeneratedAccessor.mvt
M scaffold-plugin/src/main/resources/org/jboss/seam/forge/scaffold/templates/fpak/bean.fpk
Log Message:
-----------
Merge branch 'master' of http://github.com/mikebrock/seam-forge
Commit: 39fbcda5848cf38e989fa53cfd10f16960f05587
https://github.com/seam/forge/commit/39fbcda5848cf38e989fa53cfd10f16960f0...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2011-01-17 (Mon, 17 Jan 2011)
Changed paths:
M docs/reference/src/main/docbook/en-US/plugin-dev.xml
Log Message:
-----------
updated plugin dev chapter
Commit: fa5d76e4db530c13ee692bf991d323d7a3367162
https://github.com/seam/forge/commit/fa5d76e4db530c13ee692bf991d323d7a336...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2011-01-18 (Tue, 18 Jan 2011)
Changed paths:
M docs/reference/src/main/docbook/en-US/plugin-dev.xml
Log Message:
-----------
updated @Option docs for named opts
13 years, 11 months
Seam SVN: r13999 - branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2011-01-18 09:13:56 -0500 (Tue, 18 Jan 2011)
New Revision: 13999
Modified:
branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java
Log:
JBSEAM-4764
Modified: branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java 2011-01-18 12:08:08 UTC (rev 13998)
+++ branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java 2011-01-18 14:13:56 UTC (rev 13999)
@@ -47,8 +47,9 @@
browser.type(getProperty("SEARCH_FIELD"), searchString);
browser.click(getProperty("SEARCH_SUBMIT"));
browser.waitForPageToLoad(TIMEOUT);
- assertEquals("Unexpected number of results. One result expected.", 1,
- browser.getXpathCount(getProperty("SEARCH_RESULT_ITEM")));
+ //exact number of matches depends on search algorithm,
+ //so we only check that at least something was found:
+ assertTrue("Unexpected number of results. One result expected.", browser.getXpathCount(getProperty("SEARCH_RESULT_ITEM")).intValue() > 0);
browser.click(getProperty("SEARCH_RESULT_FIRST_ROW_LINK"));
browser.waitForPageToLoad(TIMEOUT);
assertTrue("Navigation failure.", browser.getLocation().contains(
13 years, 11 months
Seam SVN: r13998 - branches/enterprise/JBPAPP_5_0/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2011-01-18 07:08:08 -0500 (Tue, 18 Jan 2011)
New Revision: 13998
Modified:
branches/enterprise/JBPAPP_5_0/build/ci.settings.xml
Log:
JBPAPP-5517 enabling snapshots repository until jbpm 3.2.10 is released
Modified: branches/enterprise/JBPAPP_5_0/build/ci.settings.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/ci.settings.xml 2011-01-18 11:53:15 UTC (rev 13997)
+++ branches/enterprise/JBPAPP_5_0/build/ci.settings.xml 2011-01-18 12:08:08 UTC (rev 13998)
@@ -271,7 +271,7 @@
-->
- <profile>
+ <profile>
<id>jboss-product-repository</id>
<repositories>
<repository>
@@ -343,28 +343,26 @@
</pluginRepositories>
</profile>
-
- <profile>
- <id>jboss-deprecated-repository</id>
+ <profile>
+ <id>jboss-snapshot-repository</id>
<repositories>
<repository>
- <id>jboss-deprecated-repository</id>
- <name>JBoss Deprecated Maven Repository</name>
- <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
+ <id>jboss-snapshot-repository</id>
+ <name>JBoss snapshot Maven Repository</name>
+ <url>https://repository.jboss.org/nexus/content/repositories/snapshots</url>
<layout>default</layout>
<releases>
- <enabled>true</enabled>
+ <enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
- <enabled>false</enabled>
+ <enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
-
</profiles>
@@ -381,7 +379,7 @@
<activeProfiles>
<activeProfile>jboss-product-repository</activeProfile>
<activeProfile>jboss-public-repository</activeProfile>
- <activeProfile>jboss-deprecated-repository</activeProfile>
+ <activeProfile>jboss-snapshot-repository</activeProfile>
</activeProfiles>
13 years, 11 months
Seam SVN: r13997 - in branches/enterprise/JBPAPP_5_0/src/test/integration: src/org/jboss/seam/test/integration and 1 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2011-01-18 06:53:15 -0500 (Tue, 18 Jan 2011)
New Revision: 13997
Added:
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java
Log:
JBPAPP-5517 adding test for exception handling
Added: branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml 2011-01-18 11:53:15 UTC (rev 13997)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<process-definition
+ name="OrderManagement"
+ xmlns="urn:jbpm.org:jpdl-3.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd"
+ >
+
+ <start-state name="start">
+ <transition to="process"/>
+ </start-state>
+
+ <task-node name="process" end-tasks="true">
+ <task name="ship" description="Ship order">
+ <assignment pooled-actors="#{shipperAssignment.pooledActors}"/>
+ </task>
+ <transition name="shipped" to="problem">
+ <action expression="#{afterShipping.log}"/>
+ </transition>
+ <transition name="cancel" to="cancelled"/>
+ </task-node>
+
+ <node name="problem">
+ <action expression="#{seamExpressionEvaluatorTestController.exceptionThrowing}"></action>
+ <transition to="complete" />
+ </node>
+
+ <end-state name="complete"/>
+ <end-state name="cancelled"/>
+
+</process-definition>
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java 2011-01-18 11:37:49 UTC (rev 13996)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java 2011-01-18 11:53:15 UTC (rev 13997)
@@ -43,7 +43,26 @@
}.run();
}
+ @Test
+ public void exceptionHandling() throws Exception
+ {
+ new FacesRequest(){
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ try {
+ invokeAction("#{seamExpressionEvaluatorTestController.createProcess5}");
+ assert false;
+ } catch (Exception e) {
+
+ }
+
+ }
+ }.run();
+ }
+
@Name("bpmTest")
static public class ProcessComponent {
@CreateProcess(definition="NoSuchProcess")
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java 2011-01-18 11:37:49 UTC (rev 13996)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java 2011-01-18 11:53:15 UTC (rev 13997)
@@ -31,6 +31,11 @@
{
}
+ @CreateProcess(definition="TestProcess5")
+ public void createProcess5()
+ {
+ }
+
public void logTrue()
{
System.out.println("true");
@@ -45,6 +50,11 @@
{
this.name = name;
}
+
+ public void exceptionThrowing()
+ {
+ throw new RuntimeException("Exception is thrown - test handling");
+ }
}
\ No newline at end of file
13 years, 11 months
Seam SVN: r13996 - branches/enterprise/JBPAPP_5_0/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2011-01-18 06:37:49 -0500 (Tue, 18 Jan 2011)
New Revision: 13996
Modified:
branches/enterprise/JBPAPP_5_0/build/root.pom.xml
branches/enterprise/JBPAPP_5_0/build/settings.xml
Log:
JBPAPP-5517 enabling snapshots repository until jbpm 3.2.10 is released
Modified: branches/enterprise/JBPAPP_5_0/build/root.pom.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/root.pom.xml 2011-01-18 11:35:21 UTC (rev 13995)
+++ branches/enterprise/JBPAPP_5_0/build/root.pom.xml 2011-01-18 11:37:49 UTC (rev 13996)
@@ -217,7 +217,7 @@
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-jpdl</artifactId>
- <version>3.2.9</version>
+ <version>3.2.10-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
Modified: branches/enterprise/JBPAPP_5_0/build/settings.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/settings.xml 2011-01-18 11:35:21 UTC (rev 13995)
+++ branches/enterprise/JBPAPP_5_0/build/settings.xml 2011-01-18 11:37:49 UTC (rev 13996)
@@ -341,28 +341,26 @@
</pluginRepositories>
</profile>
-
- <profile>
- <id>jboss-deprecated-repository</id>
+ <profile>
+ <id>jboss-snapshot-repository</id>
<repositories>
<repository>
- <id>jboss-deprecated-repository</id>
- <name>JBoss Deprecated Maven Repository</name>
- <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
+ <id>jboss-snapshot-repository</id>
+ <name>JBoss snapshot Maven Repository</name>
+ <url>https://repository.jboss.org/nexus/content/repositories/snapshots</url>
<layout>default</layout>
<releases>
- <enabled>true</enabled>
+ <enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
- <enabled>false</enabled>
+ <enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
-
</profiles>
@@ -375,11 +373,10 @@
</activeProfiles>
-->
-
<activeProfiles>
<activeProfile>jboss-product-repository</activeProfile>
<activeProfile>jboss-public-repository</activeProfile>
- <activeProfile>jboss-deprecated-repository</activeProfile>
+ <activeProfile>jboss-snapshot-repository</activeProfile>
</activeProfiles>
13 years, 11 months
Seam SVN: r13995 - in branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam: bpm and 2 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2011-01-18 06:35:21 -0500 (Tue, 18 Jan 2011)
New Revision: 13995
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/async/Asynchronous.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcessInterceptor.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/ProcessInstance.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/TaskInstance.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/navigation/TaskControl.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/pageflow/Page.java
Log:
JBPAPP-5517
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/async/Asynchronous.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/async/Asynchronous.java 2011-01-14 12:37:43 UTC (rev 13994)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/async/Asynchronous.java 2011-01-18 11:35:21 UTC (rev 13995)
@@ -55,7 +55,14 @@
Contexts.getEventContext().set(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL, true);
if (taskId!=null)
{
- BusinessProcess.instance().resumeTask(taskId);
+ try
+ {
+ BusinessProcess.instance().resumeTask(taskId);
+ }
+ catch (Exception e) {
+ log.error("Exception was thrown in BusinessProcess.resumeTask", e);
+ throw new RuntimeException(e);
+ }
}
else if (processId!=null)
{
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java 2011-01-14 12:37:43 UTC (rev 13994)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java 2011-01-18 11:35:21 UTC (rev 13995)
@@ -220,7 +220,7 @@
}
}
catch (Exception e) {
- log.debug("Exception while ending bussiness task!");
+ log.error("Exception while ending bussiness task!");
processId = null;
taskId = null;
throw new RuntimeException(e);
@@ -241,10 +241,21 @@
*
* @param transitionName the jBPM transition name
*/
- public void transition(String transitionName)
+ public void transition(String transitionName) throws Exception
{
ProcessInstance process = org.jboss.seam.bpm.ProcessInstance.instance();
- process.signal(transitionName);
+ try
+ {
+ process.signal(transitionName);
+ }
+ catch (Exception e)
+ {
+ log.error("Exception while transition is in process!");
+ processId = null;
+ taskId = null;
+ throw new RuntimeException(e);
+ }
+
if ( process.hasEnded() )
{
Events.instance().raiseEvent("org.jboss.seam.endProcess." + process.getProcessDefinition().getName());
@@ -258,7 +269,7 @@
* @param taskId the jBPM task instance id
* @return true if the task was found and was not ended
*/
- public boolean resumeTask(Long taskId)
+ public boolean resumeTask(Long taskId) throws Exception
{
setTaskId(taskId);
TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance();
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcessInterceptor.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcessInterceptor.java 2011-01-14 12:37:43 UTC (rev 13994)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcessInterceptor.java 2011-01-18 11:35:21 UTC (rev 13995)
@@ -17,21 +17,23 @@
import org.jboss.seam.annotations.intercept.Interceptor;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.BijectionInterceptor;
+import org.jboss.seam.core.EventInterceptor;
import org.jboss.seam.core.Expressions;
import org.jboss.seam.core.Init;
import org.jboss.seam.intercept.AbstractInterceptor;
import org.jboss.seam.intercept.InvocationContext;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
+import org.jboss.seam.transaction.TransactionInterceptor;
import org.jboss.seam.util.Strings;
import org.jboss.seam.web.Parameters;
-import org.jbpm.JbpmContext;
/**
* Implements annotation-based business-process demarcation.
*
* @author <a href="mailto:steve@hibernate.org">Steve Ebersole</a>
* @author Gavin King
+ * @author Marek Novotny
*/
@Interceptor(stateless=true, around=BijectionInterceptor.class)
public class BusinessProcessInterceptor extends AbstractInterceptor
@@ -42,7 +44,7 @@
@AroundInvoke
public Object aroundInvoke(InvocationContext invocation) throws Exception
- {
+ {
if ( !beforeInvocation(invocation) )
{
return null;
@@ -61,14 +63,28 @@
log.trace( "encountered @StartTask" );
StartTask tag = method.getAnnotation(StartTask.class);
Long taskId = getProcessOrTaskId( tag.taskIdParameter(), tag.taskId() );
- return BusinessProcess.instance().resumeTask(taskId);
+ try
+ {
+ return BusinessProcess.instance().resumeTask(taskId);
+ }
+ catch (Exception e) {
+ log.error("BusinessProcess.resumeTask thrown exception!");
+ return false;
+ }
}
else if ( method.isAnnotationPresent(BeginTask.class) )
{
log.trace( "encountered @BeginTask" );
BeginTask tag = method.getAnnotation(BeginTask.class);
Long taskId = getProcessOrTaskId( tag.taskIdParameter(), tag.taskId() );
- return BusinessProcess.instance().resumeTask(taskId);
+ try
+ {
+ return BusinessProcess.instance().resumeTask(taskId);
+ }
+ catch (Exception e) {
+ log.error("BusinessProcess.resumeTask thrown exception!");
+ return false;
+ }
}
else if ( method.isAnnotationPresent(ResumeProcess.class) )
{
@@ -126,8 +142,7 @@
BusinessProcess.instance().endTask( method.getAnnotation(EndTask.class).transition() );
}
catch (Exception e) {
- log.debug("Closing JBPM context because exception(s) was thrown!");
- Contexts.getBusinessProcessContext().flush();
+ log.error("Closing JBPM context because exception(s) was thrown!", e);
throw new RuntimeException(e);
}
finally
@@ -141,7 +156,18 @@
log.trace( "encountered @Transition" );
String transitionName = method.getAnnotation(org.jboss.seam.annotations.bpm.Transition.class).value();
if ( "".equals(transitionName) ) transitionName = method.getName();
- BusinessProcess.instance().transition(transitionName);
+ try
+ {
+ BusinessProcess.instance().transition(transitionName);
+ }
+ catch (Exception e) {
+ log.error("Closing JBPM context because exception(s) was thrown!", e);
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ ManagedJbpmContext.instance().close();
+ }
}
}
return result;
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/ProcessInstance.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/ProcessInstance.java 2011-01-14 12:37:43 UTC (rev 13994)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/ProcessInstance.java 2011-01-18 11:35:21 UTC (rev 13995)
@@ -16,6 +16,7 @@
import org.jboss.seam.annotations.Unwrap;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.util.Work;
/**
* A Seam component that allows injection of the current
@@ -34,17 +35,27 @@
public org.jbpm.graph.exe.ProcessInstance getProcessInstance() throws Exception
{
if ( !Contexts.isConversationContextActive() ) return null;
+
+ return new Work<org.jbpm.graph.exe.ProcessInstance>()
+ {
+
+ @Override
+ protected org.jbpm.graph.exe.ProcessInstance work() throws Exception
+ {
+ Long processId = BusinessProcess.instance().getProcessId();
+ if (processId!=null)
+ {
+ //TODO: do we need to cache this??
+ return ManagedJbpmContext.instance().getProcessInstanceForUpdate(processId);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ }.workInTransaction();
- Long processId = BusinessProcess.instance().getProcessId();
- if (processId!=null)
- {
- //TODO: do we need to cache this??
- return ManagedJbpmContext.instance().getProcessInstance(processId);
- }
- else
- {
- return null;
- }
}
public static org.jbpm.graph.exe.ProcessInstance instance()
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/TaskInstance.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/TaskInstance.java 2011-01-14 12:37:43 UTC (rev 13994)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/TaskInstance.java 2011-01-18 11:35:21 UTC (rev 13995)
@@ -36,16 +36,26 @@
{
if ( !Contexts.isConversationContextActive() ) return null;
- Long taskId = BusinessProcess.instance().getTaskId();
- if (taskId!=null)
- {
- //TODO: do we need to cache this??
- return ManagedJbpmContext.instance().getTaskInstanceForUpdate(taskId);
- }
- else
- {
- return null;
- }
+ return new Work<org.jbpm.taskmgmt.exe.TaskInstance>()
+ {
+
+ @Override
+ protected org.jbpm.taskmgmt.exe.TaskInstance work()
+ {
+ Long taskId = BusinessProcess.instance().getTaskId();
+ if (taskId!=null)
+ {
+ //TODO: do we need to cache this??
+ return ManagedJbpmContext.instance().getTaskInstance(taskId);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ }.workInTransaction();
+
}
public static org.jbpm.taskmgmt.exe.TaskInstance instance()
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/navigation/TaskControl.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/navigation/TaskControl.java 2011-01-14 12:37:43 UTC (rev 13994)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/navigation/TaskControl.java 2011-01-18 11:35:21 UTC (rev 13995)
@@ -2,7 +2,6 @@
import org.jboss.seam.bpm.BusinessProcess;
import org.jboss.seam.bpm.ManagedJbpmContext;
-import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Expressions.ValueExpression;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
@@ -33,7 +32,6 @@
}
catch (Exception e) {
log.debug("Closing JBPM context because exception(s) was thrown!");
- Contexts.getBusinessProcessContext().flush();
throw new RuntimeException(e);
}
finally
@@ -47,7 +45,13 @@
{
throw new NullPointerException("task id may not be null");
}
- BusinessProcess.instance().resumeTask(taskId.getValue());
+ try
+ {
+ BusinessProcess.instance().resumeTask(taskId.getValue());
+ }
+ catch (Exception e) {
+ log.warn("BusinessProcess.resumeTask thrown exception!");
+ }
}
if ( startTask() )
{
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/pageflow/Page.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/pageflow/Page.java 2011-01-14 12:37:43 UTC (rev 13994)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/pageflow/Page.java 2011-01-18 11:35:21 UTC (rev 13995)
@@ -3,8 +3,6 @@
import org.dom4j.Element;
import org.jboss.seam.bpm.BusinessProcess;
import org.jboss.seam.bpm.ManagedJbpmContext;
-import org.jboss.seam.contexts.BusinessProcessContext;
-import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.Interpolator;
import org.jboss.seam.log.LogProvider;
@@ -113,7 +111,6 @@
}
catch (Exception e) {
log.debug("Closing JBPM context because exception(s) was thrown!");
- Contexts.getBusinessProcessContext().flush();
throw new RuntimeException(e);
}
finally
13 years, 11 months
[seam/forge] 885349: Merge branch 'master' of http://github.com/mikebro...
by noreply@github.com
Branch: refs/heads/master
Home: https://github.com/seam/forge
Commit: 8853494fff69eab458b920dd5d50cc522cc6048f
https://github.com/seam/forge/commit/8853494fff69eab458b920dd5d50cc522cc6...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2011-01-17 (Mon, 17 Jan 2011)
Changed paths:
M scaffold-plugin/pom.xml
A scaffold-plugin/src/main/java/org/jboss/seam/forge/scaffold/plugins/GenPlugin.java
A scaffold-plugin/src/main/resources/org/jboss/seam/forge/scaffold/templates/fpak/bean.fpk
M shell-api/src/main/java/org/jboss/seam/forge/shell/Shell.java
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
M 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/Parse.java
M shell/src/main/java/org/jboss/seam/forge/shell/command/parser/NamedBooleanOptionParser.java
M shell/src/main/java/org/jboss/seam/forge/shell/plugins/builtin/ConcatenatePlugin.java
A shell/src/main/java/org/jboss/seam/forge/shell/plugins/builtin/RunPlugin.java
Log Message:
-----------
Merge branch 'master' of http://github.com/mikebrock/seam-forge
13 years, 11 months