Seam SVN: r10302 - trunk/src/main/org/jboss/seam/security/permission.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-04-05 21:36:22 -0400 (Sun, 05 Apr 2009)
New Revision: 10302
Modified:
trunk/src/main/org/jboss/seam/security/permission/JpaPermissionStore.java
Log:
JBSEAM-3672
Modified: trunk/src/main/org/jboss/seam/security/permission/JpaPermissionStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/JpaPermissionStore.java 2009-04-06 00:46:51 UTC (rev 10301)
+++ trunk/src/main/org/jboss/seam/security/permission/JpaPermissionStore.java 2009-04-06 01:36:22 UTC (rev 10302)
@@ -575,12 +575,12 @@
if (identityStore != null)
{
- if (isUser && identityStore.getUserClass().equals(principal.getClass()))
+ if (isUser && identityStore.getUserClass().isAssignableFrom(principal.getClass()))
{
return new SimplePrincipal(identityStore.getUserName(principal));
}
- if (!isUser && identityStore.getRoleClass().equals(principal.getClass()))
+ if (!isUser && identityStore.getRoleClass().isAssignableFrom(principal.getClass()))
{
String name = identityStore.getRoleName(principal);
return new Role(name, identityStore.isRoleConditional(name));
15 years, 7 months
Seam SVN: r10301 - trunk/seam-gen/build-scripts.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-05 20:46:51 -0400 (Sun, 05 Apr 2009)
New Revision: 10301
Modified:
trunk/seam-gen/build-scripts/build-prod.properties
Log:
remove whitespace
Modified: trunk/seam-gen/build-scripts/build-prod.properties
===================================================================
--- trunk/seam-gen/build-scripts/build-prod.properties 2009-04-06 00:45:13 UTC (rev 10300)
+++ trunk/seam-gen/build-scripts/build-prod.properties 2009-04-06 00:46:51 UTC (rev 10301)
@@ -1,4 +1 @@
debug=false
-
-
-
15 years, 7 months
Seam SVN: r10300 - trunk/seam-gen/ivy.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-05 20:45:13 -0400 (Sun, 05 Apr 2009)
New Revision: 10300
Modified:
trunk/seam-gen/ivy/ivy-build.xml
Log:
alias deflate to uninflate
Modified: trunk/seam-gen/ivy/ivy-build.xml
===================================================================
--- trunk/seam-gen/ivy/ivy-build.xml 2009-04-05 16:03:17 UTC (rev 10299)
+++ trunk/seam-gen/ivy/ivy-build.xml 2009-04-06 00:45:13 UTC (rev 10300)
@@ -49,7 +49,9 @@
<target name="inflate" depends="inflate-core,inflate-source,inflate-test"/>
- <target name="uninflate">
+ <target name="uninflate" depends="deflate"/>
+
+ <target name="deflate">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${lib.dir}">
<include name="**/*"/>
15 years, 7 months
Seam SVN: r10299 - trunk/doc/Seam_Reference_Guide/it-IT.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-04-05 12:03:17 -0400 (Sun, 05 Apr 2009)
New Revision: 10299
Modified:
trunk/doc/Seam_Reference_Guide/it-IT/Configuration.po
trunk/doc/Seam_Reference_Guide/it-IT/Events.po
trunk/doc/Seam_Reference_Guide/it-IT/Oc4j.po
Log:
JBSEAM-3767: Italian translation of Seam guide
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Configuration.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Configuration.po 2009-04-05 06:01:32 UTC (rev 10298)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Configuration.po 2009-04-05 16:03:17 UTC (rev 10299)
@@ -6,7 +6,7 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-03-17 20:34+0000\n"
-"PO-Revision-Date: 2009-03-31 23:31+0100\n"
+"PO-Revision-Date: 2009-04-05 17:57+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -746,13 +746,13 @@
#: Configuration.xml:393
#, no-c-format
msgid "The simple name of the bean class"
-msgstr ""
+msgstr "Il semplice nome della classe bean"
#. Tag: para
#: Configuration.xml:397
#, no-c-format
msgid "Let's look at an example. Assume that you have the following EJB bean and interface defined."
-msgstr ""
+msgstr "Guardiamo un esempio. Si assuma di avere definiti il seguente bean EJB ed un'interfaccia."
#. Tag: programlisting
#: Configuration.xml:399
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Events.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Events.po 2009-04-05 06:01:32 UTC (rev 10298)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Events.po 2009-04-05 16:03:17 UTC (rev 10299)
@@ -6,7 +6,7 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-03-31 09:07+0000\n"
-"PO-Revision-Date: 2009-03-31 11:18+0100\n"
+"PO-Revision-Date: 2009-04-05 17:58+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -694,7 +694,7 @@
#: Events.xml:412
#, no-c-format
msgid "Can be rewritten as follows:"
-msgstr ""
+msgstr "Può essere riscritto come segue:"
#. Tag: programlisting
#: Events.xml:416
@@ -1166,7 +1166,7 @@
#: Events.xml:563
#, no-c-format
msgid "Contextual events"
-msgstr ""
+msgstr "Eventi contestuali"
#. Tag: para
#: Events.xml:564
@@ -1922,13 +1922,13 @@
#: Events.xml:868
#, no-c-format
msgid "Some common exceptions"
-msgstr ""
+msgstr "Alcune eccezioni comuni"
#. Tag: para
#: Events.xml:870
#, no-c-format
msgid "If you are using JPA:"
-msgstr ""
+msgstr "Se si usa JPA:"
#. Tag: programlisting
#: Events.xml:874
@@ -1964,7 +1964,7 @@
#: Events.xml:876
#, no-c-format
msgid "If you are using the Seam Application Framework:"
-msgstr ""
+msgstr "Se si usa il Seam Application Framework:"
#. Tag: programlisting
#: Events.xml:880
@@ -1986,7 +1986,7 @@
#: Events.xml:882
#, no-c-format
msgid "If you are using Seam Security:"
-msgstr ""
+msgstr "Se si usa Seam Security:"
#. Tag: programlisting
#: Events.xml:886
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Oc4j.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Oc4j.po 2009-04-05 06:01:32 UTC (rev 10298)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Oc4j.po 2009-04-05 16:03:17 UTC (rev 10299)
@@ -6,7 +6,7 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-11-06 00:23+0000\n"
-"PO-Revision-Date: 2009-02-22 11:30+0100\n"
+"PO-Revision-Date: 2009-04-05 18:01+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -95,7 +95,7 @@
#: Oc4j.xml:72
#, no-c-format
msgid "The <literal>jee5/booking</literal> example"
-msgstr ""
+msgstr "L'esempio <literal>jee5/booking</literal>"
#. Tag: para
#: Oc4j.xml:74
@@ -107,7 +107,7 @@
#: Oc4j.xml:81
#, no-c-format
msgid "Booking Example Dependencies"
-msgstr ""
+msgstr "Dipendenze dell'esempio Prenotazione"
#. Tag: para
#: Oc4j.xml:83
@@ -167,7 +167,7 @@
#: Oc4j.xml:126
#, no-c-format
msgid "Extra dependencies"
-msgstr ""
+msgstr "Extra dipendenze"
#. Tag: para
#: Oc4j.xml:129
@@ -299,19 +299,19 @@
#: Oc4j.xml:235
#, no-c-format
msgid "<literal>lucene-core.jar</literal> — needed for hibernate search"
-msgstr ""
+msgstr "<literal>lucene-core.jar</literal> — occorre a hibernate search"
#. Tag: simpara
#: Oc4j.xml:240
#, no-c-format
msgid "<literal>antlr.jar</literal> — needed for Seam Text"
-msgstr ""
+msgstr "<literal>antlr.jar</literal> — occorra a Seam Text"
#. Tag: simpara
#: Oc4j.xml:244
#, no-c-format
msgid "<literal>jbpm-jpdl.jar</literal> — needed for Seam's JBPM"
-msgstr ""
+msgstr "<literal>jbpm-jpdl.jar</literal> — occorre a JBPM di Seam"
#. Tag: literal
#: Oc4j.xml:248
@@ -1562,7 +1562,7 @@
#: Oc4j.xml:875
#, no-c-format
msgid "Implement authenticate:"
-msgstr ""
+msgstr "Implementa authenticate:"
#. Tag: programlisting
#: Oc4j.xml:878
15 years, 7 months
Seam SVN: r10298 - trunk/ui/src/main/config/component.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-05 02:01:32 -0400 (Sun, 05 Apr 2009)
New Revision: 10298
Added:
trunk/ui/src/main/config/component/token.xml
Log:
JBSEAM-4007
Added: trunk/ui/src/main/config/component/token.xml
===================================================================
--- trunk/ui/src/main/config/component/token.xml (rev 0)
+++ trunk/ui/src/main/config/component/token.xml 2009-04-05 06:01:32 UTC (rev 10298)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
+<components>
+ <component>
+ <name>org.jboss.seam.ui.Token</name>
+ <family>org.jboss.seam.ui.Token</family>
+ <classname>org.jboss.seam.ui.component.html.HtmlToken</classname>
+ <superclass>org.jboss.seam.ui.component.UIToken</superclass>
+ <description>
+ <![CDATA[Render a secure token for the parent form that is validated on postback.]]>
+ </description>
+ <renderer generate="false" override="false">
+ <name>org.jboss.seam.ui.TokenRenderer</name>
+ <classname>org.jboss.seam.ui.renderkit.TokenRendererBase</classname>
+ </renderer>
+ <tag>
+ <name>token</name>
+ <classname>org.jboss.seam.ui.taglib.TokenTag</classname>
+ <superclass>
+ org.jboss.seam.ui.util.cdk.UIComponentTagBase
+ </superclass>
+ </tag>
+ &ui_component_attributes;
+ <property>
+ <name>requireSession</name>
+ <classname>boolean</classname>
+ <description>A flag indicating whether the session id should be tied into the secure token.</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>enableCookieNotice</name>
+ <classname>boolean</classname>
+ <description>A flag indicating whether a notice should be presented to the user if cookies are disabled.</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>allowMultiplePosts</name>
+ <classname>boolean</classname>
+ <description>A flag indicating whether the form can be submitted multiple times with the same signature (i.e., token).</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ </component>
+</components>
15 years, 7 months
Seam SVN: r10297 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-05 02:00:35 -0400 (Sun, 05 Apr 2009)
New Revision: 10297
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml
Log:
fix grammer
Modified: trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml 2009-04-05 05:59:45 UTC (rev 10296)
+++ trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml 2009-04-05 06:00:35 UTC (rev 10297)
@@ -9,9 +9,9 @@
<para>
Seam does not work with JDK 1.4 and requires JDK 5 or above as it uses
- annotations and other JDK 5.0 features.. Seam has been thoroughly tested
+ annotations and other JDK 5.0 features. Seam has been thoroughly tested
using Sun's JDKs. However there are no known issues specific to Seam with
- other JDK's.
+ other JDKs.
</para>
<section id="jdk6_dependencies">
15 years, 7 months
Seam SVN: r10296 - trunk/seam-gen/view/stylesheet.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-05 01:59:45 -0400 (Sun, 05 Apr 2009)
New Revision: 10296
Modified:
trunk/seam-gen/view/stylesheet/theme.css
Log:
change link style for menu bar
Modified: trunk/seam-gen/view/stylesheet/theme.css
===================================================================
--- trunk/seam-gen/view/stylesheet/theme.css 2009-04-05 05:56:22 UTC (rev 10295)
+++ trunk/seam-gen/view/stylesheet/theme.css 2009-04-05 05:59:45 UTC (rev 10296)
@@ -169,6 +169,14 @@
text-decoration: none;
}
+.rich-toolbar-item a:hover, .rich-ddmenu-label-select {
+ text-decoration: underline;
+}
+
+.rich-toolbar-item .rich-menu-item a:hover {
+ text-decoration: none;
+}
+
.rich-datalist {
list-style: square;
margin: 6px 0 1px 0;
15 years, 7 months
Seam SVN: r10295 - trunk/src/main/org/jboss/seam/persistence.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-05 01:56:22 -0400 (Sun, 05 Apr 2009)
New Revision: 10295
Modified:
trunk/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java
trunk/src/main/org/jboss/seam/persistence/PersistenceContexts.java
trunk/src/main/org/jboss/seam/persistence/PersistenceProvider.java
Log:
JBSEAM-3030
Modified: trunk/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java
===================================================================
--- trunk/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java 2009-04-05 05:56:07 UTC (rev 10294)
+++ trunk/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java 2009-04-05 05:56:22 UTC (rev 10295)
@@ -23,6 +23,7 @@
import org.jboss.seam.Entity;
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;
import org.jboss.seam.annotations.Scope;
@@ -150,6 +151,12 @@
}
@Override
+ public void setRenderFlushMode()
+ {
+ PersistenceContexts.instance().changeFlushMode(FlushModeType.MANUAL);
+ }
+
+ @Override
public boolean isDirty(EntityManager entityManager)
{
try
Modified: trunk/src/main/org/jboss/seam/persistence/PersistenceContexts.java
===================================================================
--- trunk/src/main/org/jboss/seam/persistence/PersistenceContexts.java 2009-04-05 05:56:07 UTC (rev 10294)
+++ trunk/src/main/org/jboss/seam/persistence/PersistenceContexts.java 2009-04-05 05:56:22 UTC (rev 10295)
@@ -18,13 +18,15 @@
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.AbstractMutable;
import org.jboss.seam.core.Manager;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
/**
- * Maintains the set of persistence contexts that have been
- * touched in a conversation.
+ * Maintains the set of persistence contexts that have been touched in a
+ * conversation. Also controls the flush mode used by the persistence contexts
+ * during the render phase.
*
* @author Gavin King
- *
*/
@Name("org.jboss.seam.persistence.persistenceContexts")
@Scope(ScopeType.CONVERSATION)
@@ -33,6 +35,7 @@
public class PersistenceContexts extends AbstractMutable implements Serializable
{
private static final long serialVersionUID = -4897350516435283182L;
+ private static final LogProvider log = Logging.getLogProvider(PersistenceContexts.class);
private Set<String> set = new HashSet<String>();
private FlushModeType flushMode;
private FlushModeType actualFlushMode;
@@ -53,7 +56,6 @@
}
}
-
public FlushModeType getFlushMode()
{
return flushMode;
@@ -104,8 +106,10 @@
{
pcm.changeFlushMode(flushMode);
}
- catch (UnsupportedOperationException uoe) {
- //swallow
+ catch (UnsupportedOperationException uoe)
+ {
+ // we won't be nasty and throw and exception, but we'll log a warning to the developer
+ log.warn(uoe.getMessage());
}
}
}
@@ -113,7 +117,9 @@
public void beforeRender()
{
- flushMode = FlushModeType.MANUAL;
+ // some JPA providers may not support MANUAL flushing
+ // defer the decision to the provider manager component
+ PersistenceProvider.instance().setRenderFlushMode();
changeFlushModes();
}
Modified: trunk/src/main/org/jboss/seam/persistence/PersistenceProvider.java
===================================================================
--- trunk/src/main/org/jboss/seam/persistence/PersistenceProvider.java 2009-04-05 05:56:07 UTC (rev 10294)
+++ trunk/src/main/org/jboss/seam/persistence/PersistenceProvider.java 2009-04-05 05:56:22 UTC (rev 10295)
@@ -14,6 +14,7 @@
import org.jboss.seam.Component;
import org.jboss.seam.Entity;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.FlushModeType;
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -71,9 +72,28 @@
*/
public void setFlushModeManual(EntityManager entityManager)
{
- throw new UnsupportedOperationException("For use of FlushMode.MANUAL, please use Hibernate as the persistence provider or use a custom PersistenceProvider");
+ throw new UnsupportedOperationException("Use of FlushMode.MANUAL requires Hibernate as the persistence provider. Please use Hibernate, a custom persistenceProvider, or remove the MANUAL flush mode setting.");
}
+
/**
+ * <p>
+ * Set the FlushMode the persistence contexts should use during rendering by
+ * calling {@link PersistenceContexts#changeFlushMode(FlushModeType)}. The
+ * actual changing of the flush mode is handled by the
+ * {@link PersistenceContexts} instance.
+ * </p>
+ * <p>
+ * Ideally, this should be MANUAL since changes should never flush to the
+ * database while in render response and the cost of a dirty check can be
+ * avoided. However, since the MANUAL mode is not officially part of the JPA
+ * specification, the default implementation will perform no operation.
+ * </p>
+ */
+ public void setRenderFlushMode() {
+ // no-op in default implementation
+ }
+
+ /**
* Does the persistence context have unflushed changes? If
* it does not, persistence context replication can be
* optimized.
@@ -131,7 +151,7 @@
}
if ( !equal )
{
- throw new OptimisticLockException("current database version number does not match passivated version number");
+ throw new OptimisticLockException("Current database version number does not match passivated version number");
}
}
/**
@@ -141,7 +161,7 @@
*/
public void enableFilter(Filter filter, EntityManager entityManager)
{
- throw new UnsupportedOperationException("For filters, please use Hibernate as the persistence provider");
+ throw new UnsupportedOperationException("Use of filters requires Hibernate as the persistence provider. Please use Hibernate or remove the filters configuration.");
}
/**
15 years, 7 months
Seam SVN: r10294 - branches/community/Seam_2_0/src/main/org/jboss/seam/persistence.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-05 01:56:07 -0400 (Sun, 05 Apr 2009)
New Revision: 10294
Modified:
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/PersistenceContexts.java
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/PersistenceProvider.java
Log:
JBSEAM-3030
Modified: branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java
===================================================================
--- branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java 2009-04-05 04:44:05 UTC (rev 10293)
+++ branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/HibernatePersistenceProvider.java 2009-04-05 05:56:07 UTC (rev 10294)
@@ -22,6 +22,7 @@
import org.jboss.seam.Entity;
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;
import org.jboss.seam.annotations.Scope;
@@ -142,6 +143,12 @@
}
@Override
+ public void setRenderFlushMode()
+ {
+ PersistenceContexts.instance().changeFlushMode(FlushModeType.MANUAL);
+ }
+
+ @Override
public boolean isDirty(EntityManager entityManager)
{
try
Modified: branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/PersistenceContexts.java
===================================================================
--- branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/PersistenceContexts.java 2009-04-05 04:44:05 UTC (rev 10293)
+++ branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/PersistenceContexts.java 2009-04-05 05:56:07 UTC (rev 10294)
@@ -16,13 +16,15 @@
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.AbstractMutable;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
/**
- * Maintains the set of persistence contexts that have been
- * touched in a conversation.
+ * Maintains the set of persistence contexts that have been touched in a
+ * conversation. Also controls the flush mode used by the persistence contexts
+ * during the render phase.
*
* @author Gavin King
- *
*/
@Name("org.jboss.seam.persistence.persistenceContexts")
@Scope(ScopeType.CONVERSATION)
@@ -31,6 +33,7 @@
public class PersistenceContexts extends AbstractMutable implements Serializable
{
private static final long serialVersionUID = -4897350516435283182L;
+ private static final LogProvider log = Logging.getLogProvider(PersistenceContexts.class);
private Set<String> set = new HashSet<String>();
private FlushModeType flushMode = FlushModeType.AUTO;
private FlushModeType actualFlushMode = FlushModeType.AUTO;
@@ -85,8 +88,10 @@
{
pcm.changeFlushMode(flushMode);
}
- catch (UnsupportedOperationException uoe) {
- //swallow
+ catch (UnsupportedOperationException uoe)
+ {
+ // we won't be nasty and throw and exception, but we'll log a warning to the developer
+ log.warn(uoe.getMessage());
}
}
}
@@ -94,7 +99,9 @@
public void beforeRender()
{
- flushMode = FlushModeType.MANUAL;
+ // some JPA providers may not support MANUAL flushing
+ // defer the decision to the provider manager component
+ PersistenceProvider.instance().setRenderFlushMode();
changeFlushModes();
}
Modified: branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/PersistenceProvider.java
===================================================================
--- branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/PersistenceProvider.java 2009-04-05 04:44:05 UTC (rev 10293)
+++ branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/PersistenceProvider.java 2009-04-05 05:56:07 UTC (rev 10294)
@@ -11,6 +11,7 @@
import org.jboss.seam.Component;
import org.jboss.seam.Entity;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.FlushModeType;
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -42,7 +43,26 @@
{
throw new UnsupportedOperationException("For use of FlushMode.MANUAL, please use Hibernate as the persistence provider or use a custom PersistenceProvider");
}
+
/**
+ * <p>
+ * Set the FlushMode the persistence contexts should use during rendering by
+ * calling {@link PersistenceContexts#changeFlushMode(FlushModeType)}. The
+ * actual changing of the flush mode is handled by the
+ * {@link PersistenceContexts} instance.
+ * </p>
+ * <p>
+ * Ideally, this should be MANUAL since changes should never flush to the
+ * database while in render response and the cost of a dirty check can be
+ * avoided. However, since the MANUAL mode is not officially part of the JPA
+ * specification, the default implementation will perform no operation.
+ * </p>
+ */
+ public void setRenderFlushMode() {
+ // no-op in default implementation
+ }
+
+ /**
* Does the persistence context have unflushed changes? If
* it does not, persistence context replication can be
* optimized.
15 years, 7 months
Seam SVN: r10293 - in trunk/seam-gen: ide-project-files/eclipse and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-05 00:44:05 -0400 (Sun, 05 Apr 2009)
New Revision: 10293
Added:
trunk/seam-gen/ide-project-files/eclipse/debug-glassfish.launch
Modified:
trunk/seam-gen/build.xml
Log:
add debug launcher to connect to GlassFish
Modified: trunk/seam-gen/build.xml
===================================================================
--- trunk/seam-gen/build.xml 2009-04-04 11:22:56 UTC (rev 10292)
+++ trunk/seam-gen/build.xml 2009-04-05 04:44:05 UTC (rev 10293)
@@ -975,6 +975,11 @@
<filterset refid="project"/>
</copy>
+ <copy tofile="${project.home}/debug-glassfish-${project.name}.launch"
+ file="${templates.dir}/ide-project-files/eclipse/debug-glassfish.launch">
+ <filterset refid="project"/>
+ </copy>
+
<copy tofile="${project.home}/${project.name}.launch"
file="${templates.dir}/hibernatetools/hibernate-console.launch">
<filterset refid="project"/>
Added: trunk/seam-gen/ide-project-files/eclipse/debug-glassfish.launch
===================================================================
--- trunk/seam-gen/ide-project-files/eclipse/debug-glassfish.launch (rev 0)
+++ trunk/seam-gen/ide-project-files/eclipse/debug-glassfish.launch 2009-04-05 04:44:05 UTC (rev 10293)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.remoteJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/@projectName@"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.launching.ALLOW_TERMINATE" value="true"/>
+<mapAttribute key="org.eclipse.jdt.launching.CONNECT_MAP">
+<mapEntry key="port" value="9009"/>
+<mapEntry key="hostname" value="localhost"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@projectName@"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_CONNECTOR_ID" value="org.eclipse.jdt.launching.socketAttachConnector"/>
+</launchConfiguration>
15 years, 7 months