You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Glen Mazza <gl...@verizon.net> on 2007/10/10 14:44:06 UTC

Re: svn commit: r583383 - in /incubator/cxf/trunk: integration/jca/src/main/java/org/apache/cxf/jca/cxf/ integration/jca/src/main/java/org/apache/cxf/jca/servant/ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/

Am Mittwoch, den 10.10.2007, 08:11 +0000 schrieb ningjiang@apache.org:
> Author: ningjiang
> Date: Wed Oct 10 01:11:24 2007
> New Revision: 583383
> 
> URL: http://svn.apache.org/viewvc?rev=583383&view=rev
> Log:
> CXF-1093 Fixed the issues those Glen pointed out, Thanks Glen and Jeff
> 
> Modified:
>     incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/WorkManagerThreadPool.java
>     incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
>     incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
>     incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/Messages.properties
> 
> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/WorkManagerThreadPool.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/WorkManagerThreadPool.java?rev=583383&r1=583382&r2=583383&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/WorkManagerThreadPool.java (original)
> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/WorkManagerThreadPool.java Wed Oct 10 01:11:24 2007
> @@ -69,7 +69,7 @@
>      }
>      
>      
> -    public void setIsLowOnThreads(boolean isLow) {
> +    void setIsLowOnThreads(boolean isLow) {
>          this.isLowOnThreads = isLow;
>      }
>      
> 
> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java?rev=583383&r1=583382&r2=583383&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java (original)
> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java Wed Oct 10 01:11:24 2007
> @@ -49,6 +49,10 @@
>      
>      private static final Logger LOG = LogUtils.getL7dLogger(EJBEndpoint.class);
>      
> +    private static final int DEFAULT_HTTP_PORT = 80;
> +    
> +    private static final String HTTPS_PREFIX = "https";
> +    
>      private EJBServantConfig config;
>      
>      private Context jndiContext;
> @@ -81,8 +85,13 @@
>          
>          String baseAddress = isNotNull(getEjbServantBaseURL()) ? getEjbServantBaseURL() 
>                                                                 : getDefaultEJBServantBaseURL();
> -        String address = baseAddress + "/" + config.getJNDIName();
> +        String address = (baseAddress + "/" + config.getJNDIName()).trim();

If you see the need to trim to the left of the baseAddress and to the
right of the getJNDIName(), I'm unsure why there might not also be a
need to trim to the right of the base address and the left of the
getJNDIName().  In other words, maybe you don't need to trim() after
all, or the trim() needs to be applied just to the config.getJNDIName(),
because baseAddress will probably always be "good".


>          factory.setAddress(address);
> +        
> +        if (address.length() >= 5 && HTTPS_PREFIX.equalsIgnoreCase(address.substring(0, 5))) {
> +            throw new UnsupportedOperationException("Do not support creating EJBEndpoint by https protocol");

EJBEndpoint creation by https protocol is unsupported


> +        }
> +        
>          if (getWorkManager() != null) {
>              setWorkManagerThreadPoolToJetty(factory.getBus(),
> baseAddress);
>          }
> @@ -134,7 +143,7 @@
>          int index = address.lastIndexOf(":");
>          int end = address.lastIndexOf("/");
>          if (index == 4) {
> -            return 80;
> +            return DEFAULT_HTTP_PORT;
>          }
>          if (end < index) {
>              return new Integer(address.substring(index +
> 1)).intValue();
> 
> Modified:
> incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/Messages.properties
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/Messages.properties?rev=583383&r1=583382&r2=583383&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/Messages.properties (original)
> +++ incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/Messages.properties Wed Oct 10 01:11:24 2007
> @@ -22,4 +22,4 @@
>  ADD_HANDLER_FAILED_MSG = Could not add cxf jetty handler to Jetty server: {0}
>  REMOVE_HANDLER_FAILED_MSG = Could not remove cxf jetty handler from Jetty server: {0}
>  CAN_NOT_FIND_HANDLER_MSG = Could not find the handler to remove for context url {0}
> -FAILED_TO_SHOWDOWN_ENGINE_MSG = Failed to shutdown the Jetty server: {0} , because it is still being used.
> \ No newline at end of file
> +FAILED_TO_SHUTDOWN_ENGINE_MSG = Failed to shutdown the Jetty server: {0} , because it is still being used.


{0}, (no space between comma and {0}.)


> \ No newline at end of file
> 
> 

Regards,
Glen