You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/04/02 10:12:24 UTC
svn commit: r643786 - in /myfaces/tobago/branches/tobago-1.0.x: ./
core/src/main/java/org/apache/myfaces/tobago/ajax/api/
core/src/main/java/org/apache/myfaces/tobago/util/
extension/fileupload/src/main/java/org/apache/myfaces/tobago/fileupload/
Author: bommel
Date: Wed Apr 2 01:12:18 2008
New Revision: 643786
URL: http://svn.apache.org/viewvc?rev=643786&view=rev
Log:
Merged revisions 643765-643771 via svnmerge from
https://svn.apache.org/repos/asf/myfaces/tobago/trunk
........
r643765 | bommel | 2008-04-02 09:22:51 +0200 (Mi, 02 Apr 2008) | 1 line
(TOBAGO-627) JNDI-Problem on Websphere Application Server
........
r643766 | bommel | 2008-04-02 09:24:31 +0200 (Mi, 02 Apr 2008) | 1 line
(TOBAGO-627) JNDI-Problem on Websphere Application Server
........
r643771 | bommel | 2008-04-02 09:35:14 +0200 (Mi, 02 Apr 2008) | 1 line
(TOBAGO-627) JNDI-Problem on Websphere Application Server
........
Added:
myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/util/JndiUtils.java
- copied unchanged from r643771, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/JndiUtils.java
Modified:
myfaces/tobago/branches/tobago-1.0.x/ (props changed)
myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/ajax/api/AjaxResponseRenderer.java
myfaces/tobago/branches/tobago-1.0.x/extension/fileupload/src/main/java/org/apache/myfaces/tobago/fileupload/FileUploadFacesContextFactoryImpl.java
Propchange: myfaces/tobago/branches/tobago-1.0.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/ajax/api/AjaxResponseRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/ajax/api/AjaxResponseRenderer.java?rev=643786&r1=643785&r2=643786&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/ajax/api/AjaxResponseRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/ajax/api/AjaxResponseRenderer.java Wed Apr 2 01:12:18 2008
@@ -31,6 +31,7 @@
import org.apache.myfaces.tobago.util.FastStringWriter;
import org.apache.myfaces.tobago.util.RequestUtils;
import org.apache.myfaces.tobago.util.ResponseUtils;
+import org.apache.myfaces.tobago.util.JndiUtils;
import javax.faces.FactoryFinder;
import javax.faces.application.StateManager;
@@ -41,7 +42,6 @@
import javax.faces.context.ResponseWriter;
import javax.faces.render.RenderKit;
import javax.faces.render.RenderKitFactory;
-import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.servlet.http.HttpServletResponse;
@@ -68,8 +68,7 @@
callback = new EncodeAjaxCallback();
try {
InitialContext ic = new InitialContext();
- Context ctx = (Context) ic.lookup("java:comp/env");
- contentType = (String) ctx.lookup("tobago.ajax.contentType");
+ contentType = (String) JndiUtils.getJndiProperty(ic, "tobago.ajax.contentType");
} catch (NamingException e) { /*ignore*/ }
if (StringUtils.isBlank(contentType)) {
Modified: myfaces/tobago/branches/tobago-1.0.x/extension/fileupload/src/main/java/org/apache/myfaces/tobago/fileupload/FileUploadFacesContextFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/extension/fileupload/src/main/java/org/apache/myfaces/tobago/fileupload/FileUploadFacesContextFactoryImpl.java?rev=643786&r1=643785&r2=643786&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/extension/fileupload/src/main/java/org/apache/myfaces/tobago/fileupload/FileUploadFacesContextFactoryImpl.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/extension/fileupload/src/main/java/org/apache/myfaces/tobago/fileupload/FileUploadFacesContextFactoryImpl.java Wed Apr 2 01:12:18 2008
@@ -18,6 +18,7 @@
*/
import org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataRequest;
+import org.apache.myfaces.tobago.util.JndiUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -27,7 +28,6 @@
import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
import javax.servlet.http.HttpServletRequest;
-import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.io.File;
@@ -74,10 +74,9 @@
InitialContext ic = null;
try {
ic = new InitialContext();
- Context ctx = (Context) ic.lookup("java:comp/env");
try {
- String repositoryPath = (String) ctx.lookup("uploadRepositoryPath");
+ String repositoryPath = (String) JndiUtils.getJndiProperty(ic, "uploadRepositoryPath");
if (repositoryPath != null) {
File file = new File(repositoryPath);
if (!file.exists()) {
@@ -95,7 +94,8 @@
}
try {
- maxSize = TobagoMultipartFormdataRequest.getMaxSize((String) ctx.lookup("uploadMaxFileSize"));
+ maxSize =
+ TobagoMultipartFormdataRequest.getMaxSize((String) JndiUtils.getJndiProperty(ic, "uploadMaxFileSize"));
} catch (NamingException ne) {
// ignore
}