Seam SVN: r8831 - in branches/Seam_2_0_FP: src/main/org/jboss/seam/jms and 1 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-08-27 16:28:45 -0400 (Wed, 27 Aug 2008)
New Revision: 8831
Modified:
branches/Seam_2_0_FP/examples/remoting/chatroom/resources/chatroom-service.xml
branches/Seam_2_0_FP/src/main/org/jboss/seam/jms/QueueConnection.java
branches/Seam_2_0_FP/src/main/org/jboss/seam/jms/TopicConnection.java
branches/Seam_2_0_FP/src/remoting/org/jboss/seam/remoting/messaging/JBossConnectionProvider.java
Log:
JBPAPP-1113
Modified: branches/Seam_2_0_FP/examples/remoting/chatroom/resources/chatroom-service.xml
===================================================================
--- branches/Seam_2_0_FP/examples/remoting/chatroom/resources/chatroom-service.xml 2008-08-27 15:27:14 UTC (rev 8830)
+++ branches/Seam_2_0_FP/examples/remoting/chatroom/resources/chatroom-service.xml 2008-08-27 20:28:45 UTC (rev 8831)
@@ -1,16 +1,19 @@
<server>
- <mbean code="org.jboss.mq.server.jmx.Topic"
- name="jboss.mq.destination:service=Topic,name=chatroomTopic">
- <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
- <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
- <attribute name="SecurityConf">
- <security>
- <role name="guest" read="true" write="true"/>
- <role name="publisher" read="true" write="true" create="false"/>
- <role name="durpublisher" read="true" write="true" create="true"/>
- </security>
- </attribute>
- </mbean>
+ <mbean code="org.jboss.jms.server.destination.TopicService"
+ name="jboss.messaging.destination:service=Topic,name=chatroomTopic"
+ xmbean-dd="xmdesc/Topic-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">
+ jboss.messaging:service=ServerPeer
+ </depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="SecurityConfig">
+ <security>
+ <role name="guest" read="true" write="true"/>
+ <role name="publisher" read="true" write="true" create="false"/>
+ <role name="durpublisher" read="true" write="true" create="true"/>
+ </security>
+ </attribute>
+ </mbean>
</server>
Modified: branches/Seam_2_0_FP/src/main/org/jboss/seam/jms/QueueConnection.java
===================================================================
--- branches/Seam_2_0_FP/src/main/org/jboss/seam/jms/QueueConnection.java 2008-08-27 15:27:14 UTC (rev 8830)
+++ branches/Seam_2_0_FP/src/main/org/jboss/seam/jms/QueueConnection.java 2008-08-27 20:28:45 UTC (rev 8831)
@@ -18,7 +18,7 @@
import org.jboss.seam.util.Naming;
/**
- * Manager for a JMS QueueConnection. By default, the JBoss MQ UIL2.
+ * Manager for a JMS QueueConnection. By default, JBoss Messaging
*
* @author Gavin King
*
@@ -29,7 +29,7 @@
@Install(precedence=BUILT_IN, genericDependencies=ManagedQueueSender.class)
public class QueueConnection
{
- private String queueConnectionFactoryJndiName = "UIL2ConnectionFactory";
+ private String queueConnectionFactoryJndiName = "ConnectionFactory";
private javax.jms.QueueConnection queueConnection;
/**
Modified: branches/Seam_2_0_FP/src/main/org/jboss/seam/jms/TopicConnection.java
===================================================================
--- branches/Seam_2_0_FP/src/main/org/jboss/seam/jms/TopicConnection.java 2008-08-27 15:27:14 UTC (rev 8830)
+++ branches/Seam_2_0_FP/src/main/org/jboss/seam/jms/TopicConnection.java 2008-08-27 20:28:45 UTC (rev 8831)
@@ -18,7 +18,7 @@
import org.jboss.seam.util.Naming;
/**
- * Manager for a JMS TopicConnection. By default, the JBoss MQ UIL2.
+ * Manager for a JMS TopicConnection. By default, JBoss Messaging
*
* @author Gavin King
*
@@ -29,7 +29,7 @@
@Install(precedence=BUILT_IN, genericDependencies=ManagedTopicPublisher.class)
public class TopicConnection
{
- private String topicConnectionFactoryJndiName = "UIL2ConnectionFactory";
+ private String topicConnectionFactoryJndiName = "ConnectionFactory";
private javax.jms.TopicConnection topicConnection;
/**
Modified: branches/Seam_2_0_FP/src/remoting/org/jboss/seam/remoting/messaging/JBossConnectionProvider.java
===================================================================
--- branches/Seam_2_0_FP/src/remoting/org/jboss/seam/remoting/messaging/JBossConnectionProvider.java 2008-08-27 15:27:14 UTC (rev 8830)
+++ branches/Seam_2_0_FP/src/remoting/org/jboss/seam/remoting/messaging/JBossConnectionProvider.java 2008-08-27 20:28:45 UTC (rev 8831)
@@ -10,7 +10,7 @@
*/
public class JBossConnectionProvider implements JMSConnectionProvider
{
- private static final String FACTORY_JNDI_NAME = "UIL2ConnectionFactory";
+ private static final String FACTORY_JNDI_NAME = "ConnectionFactory";
public TopicConnection createConnection()
throws Exception
16 years, 5 months
Seam SVN: r8830 - trunk/examples/icefaces.
by seam-commits@lists.jboss.org
Author: jguglielmin
Date: 2008-08-27 11:27:14 -0400 (Wed, 27 Aug 2008)
New Revision: 8830
Modified:
trunk/examples/icefaces/build.xml
Log:
updated version of ICEfaces to 1.7.1 from 1.6.1
Modified: trunk/examples/icefaces/build.xml
===================================================================
--- trunk/examples/icefaces/build.xml 2008-08-27 12:20:29 UTC (rev 8829)
+++ trunk/examples/icefaces/build.xml 2008-08-27 15:27:14 UTC (rev 8830)
@@ -26,13 +26,13 @@
<target name="copyextradependencies">
<artifact:dependencies filesetId="icefaces.fileset" versionsId="icefaces.versions">
- <dependency groupId="org.icefaces" artifactId="icefaces" version="1.7.0">
+ <dependency groupId="org.icefaces" artifactId="icefaces" version="1.7.1">
<exclusion groupId="javax.el" artifactId="el-api" />
</dependency>
- <dependency groupId="org.icefaces" artifactId="icefaces-comps" version="1.7.0">
+ <dependency groupId="org.icefaces" artifactId="icefaces-comps" version="1.7.1">
<exclusion groupId="javax.el" artifactId="el-api" />
</dependency>
- <dependency groupId="org.icefaces" artifactId="icefaces-facelets" version="1.7.0">
+ <dependency groupId="org.icefaces" artifactId="icefaces-facelets" version="1.7.1">
<exclusion groupId="javax.el" artifactId="el-api" />
</dependency>
<remoteRepository refId="repository.jboss.org" />
16 years, 5 months
Seam SVN: r8829 - trunk/src/main/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-08-27 08:20:29 -0400 (Wed, 27 Aug 2008)
New Revision: 8829
Modified:
trunk/src/main/org/jboss/seam/security/Identity.java
trunk/src/main/org/jboss/seam/security/RunAsOperation.java
Log:
JBSEAM-3224
Modified: trunk/src/main/org/jboss/seam/security/Identity.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/Identity.java 2008-08-27 09:35:03 UTC (rev 8828)
+++ trunk/src/main/org/jboss/seam/security/Identity.java 2008-08-27 12:20:29 UTC (rev 8829)
@@ -78,7 +78,7 @@
private RememberMe rememberMe;
- private boolean systemOp;
+ private ThreadLocal<Boolean> systemOp = new ThreadLocal<Boolean>();
private String jaasConfigName = null;
@@ -412,7 +412,7 @@
public boolean hasRole(String role)
{
if (!securityEnabled) return true;
- if (systemOp) return true;
+ if (systemOp.get()) return true;
isLoggedIn(true);
@@ -524,7 +524,7 @@
*/
public void checkPermission(String name, String action, Object...arg)
{
- if (systemOp) return;
+ if (systemOp.get()) return;
isLoggedIn(true);
@@ -546,7 +546,7 @@
public void checkPermission(Object target, String action)
{
- if (systemOp) return;
+ if (systemOp.get()) return;
isLoggedIn(true);
@@ -577,7 +577,7 @@
public boolean hasPermission(String name, String action, Object...arg)
{
if (!securityEnabled) return true;
- if (systemOp) return true;
+ if (systemOp.get()) return true;
if (permissionMapper == null) return false;
if (arg != null)
@@ -598,7 +598,7 @@
public boolean hasPermission(Object target, String action)
{
if (!securityEnabled) return true;
- if (systemOp) return true;
+ if (systemOp.get()) return true;
if (permissionMapper == null) return false;
if (target == null) return false;
@@ -706,13 +706,13 @@
principal = operation.getPrincipal();
subject = operation.getSubject();
- systemOp = operation.isSystemOperation();
+ systemOp.set(operation.isSystemOperation());
operation.execute();
}
finally
{
- systemOp = false;
+ systemOp.set(false);
principal = savedPrincipal;
subject = savedSubject;
}
Modified: trunk/src/main/org/jboss/seam/security/RunAsOperation.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/RunAsOperation.java 2008-08-27 09:35:03 UTC (rev 8828)
+++ trunk/src/main/org/jboss/seam/security/RunAsOperation.java 2008-08-27 12:20:29 UTC (rev 8829)
@@ -37,7 +37,7 @@
public RunAsOperation(boolean systemOp)
{
this();
- systemOp = true;
+ this.systemOp = systemOp;
}
public abstract void execute();
16 years, 5 months
Seam SVN: r8828 - in trunk/src/pdf: org/jboss/seam/pdf/ui and 1 other directory.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2008-08-27 05:35:03 -0400 (Wed, 27 Aug 2008)
New Revision: 8828
Added:
trunk/src/pdf/org/jboss/seam/pdf/ui/FormComponent.java
trunk/src/pdf/org/jboss/seam/pdf/ui/UIField.java
trunk/src/pdf/org/jboss/seam/pdf/ui/UIForm.java
Modified:
trunk/src/pdf/META-INF/faces-config.xml
trunk/src/pdf/META-INF/seam-pdf.taglib.xml
Log:
Support for filling of PDF form fields. Preliminary pre-alpha.
Modified: trunk/src/pdf/META-INF/faces-config.xml
===================================================================
--- trunk/src/pdf/META-INF/faces-config.xml 2008-08-27 06:18:18 UTC (rev 8827)
+++ trunk/src/pdf/META-INF/faces-config.xml 2008-08-27 09:35:03 UTC (rev 8828)
@@ -149,6 +149,17 @@
<component-class>org.jboss.seam.pdf.ui.UISwingComponent</component-class>
</component>
+ <component>
+ <component-type>org.jboss.seam.pdf.ui.UIField</component-type>
+ <component-class>org.jboss.seam.pdf.ui.UIField</component-class>
+ </component>
+
+ <component>
+ <component-type>org.jboss.seam.pdf.ui.UIForm</component-type>
+ <component-class>org.jboss.seam.pdf.ui.UIForm</component-class>
+ </component>
+
+
<!--
<render-kit>
<render-kit-id>PDF</render-kit-id>
Modified: trunk/src/pdf/META-INF/seam-pdf.taglib.xml
===================================================================
--- trunk/src/pdf/META-INF/seam-pdf.taglib.xml 2008-08-27 06:18:18 UTC (rev 8827)
+++ trunk/src/pdf/META-INF/seam-pdf.taglib.xml 2008-08-27 09:35:03 UTC (rev 8828)
@@ -208,4 +208,19 @@
<component-type>org.jboss.seam.pdf.ui.UISwingComponent</component-type>
</component>
</tag>
+
+ <tag>
+ <tag-name>form</tag-name>
+ <component>
+ <component-type>org.jboss.seam.pdf.ui.UIForm</component-type>
+ </component>
+ </tag>
+
+ <tag>
+ <tag-name>field</tag-name>
+ <component>
+ <component-type>org.jboss.seam.pdf.ui.UIField</component-type>
+ </component>
+ </tag>
+
</facelet-taglib>
Added: trunk/src/pdf/org/jboss/seam/pdf/ui/FormComponent.java
===================================================================
--- trunk/src/pdf/org/jboss/seam/pdf/ui/FormComponent.java (rev 0)
+++ trunk/src/pdf/org/jboss/seam/pdf/ui/FormComponent.java 2008-08-27 09:35:03 UTC (rev 8828)
@@ -0,0 +1,19 @@
+package org.jboss.seam.pdf.ui;
+
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+public abstract class FormComponent extends UIComponentBase
+{
+ protected static final String FIELDS_KEY = "acrofields";
+
+ protected Object valueOf(String name, Object defaultValue)
+ {
+ Object value = defaultValue;
+ if (getValueExpression(name) != null)
+ {
+ value = getValueExpression(name).getValue(FacesContext.getCurrentInstance().getELContext());
+ }
+ return value;
+ }
+}
Added: trunk/src/pdf/org/jboss/seam/pdf/ui/UIField.java
===================================================================
--- trunk/src/pdf/org/jboss/seam/pdf/ui/UIField.java (rev 0)
+++ trunk/src/pdf/org/jboss/seam/pdf/ui/UIField.java 2008-08-27 09:35:03 UTC (rev 8828)
@@ -0,0 +1,61 @@
+package org.jboss.seam.pdf.ui;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.core.Interpolator;
+
+import com.lowagie.text.DocumentException;
+import com.lowagie.text.pdf.AcroFields;
+
+public class UIField extends FormComponent
+{
+ public static final String COMPONENT_FAMILY = "org.jboss.seam.pdf.UIField";
+
+ private String name;
+ private String value;
+
+ @Override
+ public void encodeBegin(FacesContext facesContext) throws IOException
+ {
+ AcroFields fields = (AcroFields) Contexts.getEventContext().get(FIELDS_KEY);
+ try
+ {
+ fields.setField(getName(), getValue());
+ }
+ catch (DocumentException e)
+ {
+ String message = Interpolator.instance().interpolate("Could not set field #0 to #1", getName(), getValue());
+ throw new IOException(message, e);
+ }
+ }
+
+ @Override
+ public String getFamily()
+ {
+ return COMPONENT_FAMILY;
+ }
+
+ public String getName()
+ {
+ return (String) valueOf("name", name);
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getValue()
+ {
+ return (String) valueOf("value", value);
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
Added: trunk/src/pdf/org/jboss/seam/pdf/ui/UIForm.java
===================================================================
--- trunk/src/pdf/org/jboss/seam/pdf/ui/UIForm.java (rev 0)
+++ trunk/src/pdf/org/jboss/seam/pdf/ui/UIForm.java 2008-08-27 09:35:03 UTC (rev 8828)
@@ -0,0 +1,114 @@
+package org.jboss.seam.pdf.ui;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.URL;
+
+import javax.faces.context.FacesContext;
+
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.core.Manager;
+import org.jboss.seam.document.DocumentData;
+import org.jboss.seam.document.DocumentStore;
+import org.jboss.seam.document.DocumentData.DocumentType;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.navigation.Pages;
+
+import com.lowagie.text.DocumentException;
+import com.lowagie.text.pdf.AcroFields;
+import com.lowagie.text.pdf.PdfReader;
+import com.lowagie.text.pdf.PdfStamper;
+
+public class UIForm extends FormComponent
+{
+ public static final String COMPONENT_FAMILY = "org.jboss.seam.pdf.UIForm";
+ private static final String CONTENT_TYPE = "application/pdf";
+
+ private Log log = Logging.getLog(getClass());
+
+ private String URL;
+
+ PdfReader reader;
+ PdfStamper stamper;
+ AcroFields fields;
+ ByteArrayOutputStream buffer;
+
+ public String getURL()
+ {
+ return (String) valueOf("URL", URL);
+ }
+
+ public void setURL(String url)
+ {
+ URL = url;
+ }
+
+ @Override
+ public void encodeBegin(FacesContext facesContext) throws IOException
+ {
+ reader = new PdfReader(new URL(getURL()));
+ buffer = new ByteArrayOutputStream();
+ try
+ {
+ stamper = new PdfStamper(reader, buffer);
+ }
+ catch (DocumentException e)
+ {
+ throw new IOException("Could not create PDF stamper", e);
+ }
+ fields = stamper.getAcroFields();
+ Contexts.getEventContext().set(FIELDS_KEY, fields);
+ }
+
+ @Override
+ public void encodeEnd(FacesContext facesContext) throws IOException
+ {
+ stamper.setFormFlattening(true);
+ try
+ {
+ stamper.close();
+ }
+ catch (DocumentException e)
+ {
+ throw new IOException("Could not flush PDF", e);
+ }
+
+ String viewId = Pages.getViewId(facesContext);
+ String baseName = baseNameForViewId(viewId);
+ DocumentStore store = DocumentStore.instance();
+ DocumentType documentType = new DocumentData.DocumentType("pdf", "application/pdf");
+ DocumentData documentData = new DocumentData(baseName, documentType, buffer.toByteArray());
+ String id = store.newId();
+ String url = store.preferredUrlForContent(baseName, documentType.getExtension(), id);
+ url = Manager.instance().encodeConversationId(url, viewId);
+ store.saveData(id, documentData);
+ log.info("Redirecting to #0", url);
+ facesContext.getExternalContext().redirect(url);
+ }
+
+
+ public static String baseNameForViewId(String viewId)
+ {
+ int pos = viewId.lastIndexOf("/");
+ if (pos != -1)
+ {
+ viewId = viewId.substring(pos + 1);
+ }
+
+ pos = viewId.lastIndexOf(".");
+ if (pos != -1)
+ {
+ viewId = viewId.substring(0, pos);
+ }
+
+ return viewId;
+ }
+
+ @Override
+ public String getFamily()
+ {
+ return COMPONENT_FAMILY;
+ }
+
+}
16 years, 5 months
Seam SVN: r8827 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2008-08-27 02:18:18 -0400 (Wed, 27 Aug 2008)
New Revision: 8827
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
Log:
Minor, caps in &Excel; macro
Modified: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-08-27 05:28:57 UTC (rev 8826)
+++ trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-08-27 06:18:18 UTC (rev 8827)
@@ -1,7 +1,7 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY excel 'the Microsoft® Excel® spreadsheet application'>
-<!ENTITY Excel 'the Microsoft® Excel® spreadsheet application'>
+<!ENTITY Excel 'The Microsoft® Excel® spreadsheet application'>
]>
<chapter id="excel">
16 years, 5 months
Seam SVN: r8826 - in trunk/seam-gen: icefaces/build-scripts and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-08-27 01:28:57 -0400 (Wed, 27 Aug 2008)
New Revision: 8826
Modified:
trunk/seam-gen/build-scripts/build-war.xml
trunk/seam-gen/icefaces/build-scripts/build-war.xml
Log:
move the groovyc taskdef to a proper place inside the init target
Modified: trunk/seam-gen/build-scripts/build-war.xml
===================================================================
--- trunk/seam-gen/build-scripts/build-war.xml 2008-08-27 05:28:10 UTC (rev 8825)
+++ trunk/seam-gen/build-scripts/build-war.xml 2008-08-27 05:28:57 UTC (rev 8826)
@@ -36,11 +36,12 @@
<fileset refid="lib" />
</path>
- <taskdef name ="groovyc"
- classname ="org.codehaus.groovy.ant.Groovyc"
- classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+ <target name="init" description="Initialize the build">
- <target name="init" description="Initialize the build">
+ <taskdef name ="groovyc"
+ classname ="org.codehaus.groovy.ant.Groovyc"
+ classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+
<mkdir dir="${classes.model.dir}" />
<mkdir dir="${classes.action.dir}" />
<mkdir dir="${dist.dir}" />
Modified: trunk/seam-gen/icefaces/build-scripts/build-war.xml
===================================================================
--- trunk/seam-gen/icefaces/build-scripts/build-war.xml 2008-08-27 05:28:10 UTC (rev 8825)
+++ trunk/seam-gen/icefaces/build-scripts/build-war.xml 2008-08-27 05:28:57 UTC (rev 8826)
@@ -36,11 +36,12 @@
<fileset refid="lib" />
</path>
- <taskdef name ="groovyc"
- classname ="org.codehaus.groovy.ant.Groovyc"
- classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+ <target name="init" description="Initialize the build">
- <target name="init" description="Initialize the build">
+ <taskdef name ="groovyc"
+ classname ="org.codehaus.groovy.ant.Groovyc"
+ classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+
<mkdir dir="${classes.model.dir}" />
<mkdir dir="${classes.action.dir}" />
<mkdir dir="${dist.dir}" />
16 years, 5 months
Seam SVN: r8825 - in branches/Seam_2_0/seam-gen: icefaces/build-scripts and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-08-27 01:28:10 -0400 (Wed, 27 Aug 2008)
New Revision: 8825
Modified:
branches/Seam_2_0/seam-gen/build-scripts/build-war.xml
branches/Seam_2_0/seam-gen/icefaces/build-scripts/build-war.xml
Log:
move the groovyc taskdef to a proper place inside the init target
Modified: branches/Seam_2_0/seam-gen/build-scripts/build-war.xml
===================================================================
--- branches/Seam_2_0/seam-gen/build-scripts/build-war.xml 2008-08-26 23:14:14 UTC (rev 8824)
+++ branches/Seam_2_0/seam-gen/build-scripts/build-war.xml 2008-08-27 05:28:10 UTC (rev 8825)
@@ -36,11 +36,12 @@
<fileset refid="lib" />
</path>
- <taskdef name ="groovyc"
- classname ="org.codehaus.groovy.ant.Groovyc"
- classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+ <target name="init" description="Initialize the build">
- <target name="init" description="Initialize the build">
+ <taskdef name ="groovyc"
+ classname ="org.codehaus.groovy.ant.Groovyc"
+ classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+
<mkdir dir="${classes.model.dir}" />
<mkdir dir="${classes.action.dir}" />
<mkdir dir="${dist.dir}" />
Modified: branches/Seam_2_0/seam-gen/icefaces/build-scripts/build-war.xml
===================================================================
--- branches/Seam_2_0/seam-gen/icefaces/build-scripts/build-war.xml 2008-08-26 23:14:14 UTC (rev 8824)
+++ branches/Seam_2_0/seam-gen/icefaces/build-scripts/build-war.xml 2008-08-27 05:28:10 UTC (rev 8825)
@@ -36,11 +36,12 @@
<fileset refid="lib" />
</path>
- <taskdef name ="groovyc"
- classname ="org.codehaus.groovy.ant.Groovyc"
- classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+ <target name="init" description="Initialize the build">
- <target name="init" description="Initialize the build">
+ <taskdef name ="groovyc"
+ classname ="org.codehaus.groovy.ant.Groovyc"
+ classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+
<mkdir dir="${classes.model.dir}" />
<mkdir dir="${classes.action.dir}" />
<mkdir dir="${dist.dir}" />
16 years, 5 months
Seam SVN: r8824 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: danielc.roth
Date: 2008-08-26 19:14:14 -0400 (Tue, 26 Aug 2008)
New Revision: 8824
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
Log:
minor
Modified: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-08-26 23:10:53 UTC (rev 8823)
+++ trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-08-26 23:14:14 UTC (rev 8824)
@@ -46,11 +46,11 @@
<programlisting role="XML">
<![CDATA[
<excel:excelFactory>
- <property name="implementations">
- <key>myExcelExporter</key>
- <value>my.excel.exporter.ExcelExport</value>
- </property>
- </excel:excelFactory>
+ <property name="implementations">
+ <key>myExcelExporter</key>
+ <value>my.excel.exporter.ExcelExport</value>
+ </property>
+ </excel:excelFactory>
]]>
</programlisting>
<para>
16 years, 5 months
Seam SVN: r8823 - trunk/src/main/org/jboss/seam/core.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-08-26 19:10:53 -0400 (Tue, 26 Aug 2008)
New Revision: 8823
Modified:
trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java
Log:
JBSEAM-3301
Modified: trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java 2008-08-26 23:04:38 UTC (rev 8822)
+++ trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java 2008-08-26 23:10:53 UTC (rev 8823)
@@ -1,6 +1,8 @@
//$Id$
package org.jboss.seam.core;
+import java.util.concurrent.locks.ReentrantLock;
+
import org.jboss.seam.Component;
import org.jboss.seam.annotations.intercept.AroundInvoke;
import org.jboss.seam.annotations.intercept.Interceptor;
@@ -12,51 +14,99 @@
* invoking, outject dependencies back into their context.
*
* @author Gavin King
+ * @author Shane Bryzak
*/
@Interceptor
public class BijectionInterceptor extends AbstractInterceptor
{
private static final long serialVersionUID = 4686458105931528659L;
- private Integer counter = 0;
+ private boolean injected;
+
+ private int counter = 0;
+
+ private ReentrantLock lock = new ReentrantLock();
+
+ @Override
+ public void setComponent(Component component)
+ {
+ super.setComponent(component);
+ }
@AroundInvoke
public Object aroundInvoke(InvocationContext invocation) throws Exception
{
+ Component component = getComponent();
+ boolean enforceRequired = !component.isLifecycleMethod( invocation.getMethod() );
+
try
- {
- synchronized (counter)
+ {
+ lock.lock();
+ try
{
- if (counter == 0)
- {
- Component component = getComponent();
- boolean enforceRequired = !component.isLifecycleMethod( invocation.getMethod() );
+ if (!injected)
+ {
component.inject( invocation.getTarget(), enforceRequired );
+ injected = true;
}
+
counter++;
}
-
+ finally
+ {
+ lock.unlock();
+ }
+
Object result = invocation.proceed();
-
- if (counter == 1)
+
+ lock.lock();
+ try
{
- Component component = getComponent();
- boolean enforceRequired = !component.isLifecycleMethod( invocation.getMethod() );
- component.outject( invocation.getTarget(), enforceRequired );
+ counter--;
+
+ if (counter == 0)
+ {
+ try
+ {
+ component.outject( invocation.getTarget(), enforceRequired );
+ }
+ finally
+ {
+ // Avoid an extra lock by disinjecting here instead of the finally block
+ if (injected)
+ {
+ injected = false;
+ component.disinject( invocation.getTarget() );
+ }
+ }
+ }
}
+ finally
+ {
+ lock.unlock();
+ }
+
return result;
}
finally
- {
- synchronized (counter)
+ {
+ if (injected)
{
- if (counter == 1)
+ lock.lock();
+ try
{
- Component component = getComponent();
- component.disinject( invocation.getTarget() );
+ counter--;
+
+ if (counter == 0)
+ {
+ injected = false;
+ component.disinject( invocation.getTarget() );
+ }
}
- counter--;
-
+ finally
+ {
+ lock.unlock();
+ }
}
}
}
16 years, 5 months
Seam SVN: r8822 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: danielc.roth
Date: 2008-08-26 19:04:38 -0400 (Tue, 26 Aug 2008)
New Revision: 8822
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
Log:
JBSEAM-3338
Modified: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-08-26 19:41:59 UTC (rev 8821)
+++ trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-08-26 23:04:38 UTC (rev 8822)
@@ -1,10 +1,10 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
-<!ENTITY excel 'the Microsoft® Excel® spreadsheet application'>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY excel 'the Microsoft® Excel® spreadsheet application'>
<!ENTITY Excel 'the Microsoft® Excel® spreadsheet application'>
-]>
-
-<chapter id="excel">
+]>
+
+<chapter id="excel">
<title>&Excel;</title>
<para>
Seam also supports generation of &excel; spreadsheets through the
@@ -41,24 +41,28 @@
<para>
Customizing the module to support other kinds of &excel; spreadsheet
API's has been made very easy. Implement the <literal>ExcelWorkbook
- </literal> interface, and register in components.xml.
- <programlisting role="XML">
- <![CDATA[
- <excel:excelFactory>
- <property name="implementations">
- <key>myExcelExporter</key>
- <value>my.excel.exporter.ExcelExport</value>
- </property>
- </excel:excelFactory>
- ]]>
- </programlisting>
+ </literal> interface, and register in components.xml.
+ </para>
+ <programlisting role="XML">
+ <![CDATA[
+ <excel:excelFactory>
+ <property name="implementations">
+ <key>myExcelExporter</key>
+ <value>my.excel.exporter.ExcelExport</value>
+ </property>
+ </excel:excelFactory>
+ ]]>
+ </programlisting>
+ <para>
and register the excel namespace in the components tag with
+ </para>
<programlisting role="XML">
- <![CDATA[
- xmlns:excel="http://jboss.com/products/seam/excel"
- ]]>
- </programlisting>
- Then set the UIWorkbook type to <literal>myExcelExporter</literal> and your
+ <![CDATA[
+ xmlns:excel="http://jboss.com/products/seam/excel"
+ ]]>
+ </programlisting>
+ <para>
+ Then set the UIWorkbook type to <literal>myExcelExporter</literal> and your
own exporter will be used. Default is "jxl", but support for CSV has also been
added, using the type "csv".
</para>
@@ -2914,7 +2918,7 @@
</para>
<programlisting role="XML">
<![CDATA[
- <h:commandLink
+ <h:commandLink
value="Export"
action="#{excelExporter.export('theForm:theDataTable')}"
/>
16 years, 5 months