Changeset 1505


Ignore:
Timestamp:
04/26/13 10:21:48 (7 years ago)
Author:
philsmart
Message:

changes to jetty 8.1

Location:
raptor-mua/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • raptor-mua/trunk/pom.xml

    r1485 r1505  
    1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
     1<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     2    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
    23    <modelVersion>4.0.0</modelVersion> 
    34    <groupId>uk.ac.cardiff.raptor</groupId> 
     
    3233        <apache.cxf.version>2.2.8</apache.cxf.version> 
    3334        <spring.version>3.0.3.RELEASE</spring.version> 
    34         <jetty.version>6.1.23</jetty.version> 
     35        <jetty.version>8.1.10.v20130312</jetty.version> 
    3536    </properties> 
    3637 
     
    7475        </dependency> 
    7576 
     77 
     78 
    7679        <!-- jetty runtime for standalone deployment --> 
    7780 
    7881        <dependency> 
    79             <groupId>org.mortbay.jetty</groupId> 
    80             <artifactId>jetty</artifactId> 
     82            <groupId>org.eclipse.jetty</groupId> 
     83            <artifactId>jetty-server</artifactId> 
    8184            <version>${jetty.version}</version> 
    8285        </dependency> 
    8386        <dependency> 
    84             <groupId>org.mortbay.jetty</groupId> 
    85             <artifactId>start</artifactId> 
     87            <groupId>org.eclipse.jetty</groupId> 
     88            <artifactId>jetty-servlet</artifactId> 
     89            <version>${jetty.version}</version>     
     90        </dependency> 
     91         <dependency> 
     92            <groupId>org.eclipse.jetty</groupId> 
     93            <artifactId>jetty-webapp</artifactId> 
    8694            <version>${jetty.version}</version> 
    8795        </dependency> 
    88         <dependency> 
    89             <groupId>org.mortbay.jetty</groupId> 
    90             <artifactId>jetty-util</artifactId> 
    91             <version>${jetty.version}</version> 
    92         </dependency> 
     96       
    9397 
    9498 
     
    264268            <version>8.4-702.jdbc4</version> 
    265269        </dependency> 
     270 
     271 
     272        <dependency> 
     273            <groupId>oracle.jdbc</groupId> 
     274            <artifactId>ojdbc</artifactId> 
     275            <version>6</version> 
     276        </dependency> 
     277 
     278        
    266279 
    267280 
  • raptor-mua/trunk/src/main/conf-default/logging.xml

    r1369 r1505  
    3636                <appender-ref ref="FILE" /> 
    3737        </logger> 
    38         <logger name="org.mortbay" level="INFO"> 
     38        <logger name="org.eclipse.jetty" level="INFO"> 
    3939                <appender-ref ref="FILE" /> 
    4040        </logger> 
  • raptor-mua/trunk/src/main/config/database.xml

    r1485 r1505  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <!-- Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk> Licensed 
    3         under the Apache License, Version 2.0 (the "License"); you may not use this 
    4         file except in compliance with the License. You may obtain a copy of the 
    5         License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by 
    6         applicable law or agreed to in writing, software distributed under the License 
    7         is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
    8         KIND, either express or implied. See the License for the specific language 
    9         governing permissions and limitations under the License. --> 
     2<!-- Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk> Licensed under the Apache License, Version 2.0 (the "License");  
     3    you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0  
     4    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS  
     5    IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language  
     6    governing permissions and limitations under the License. --> 
    107 
    11 <beans xmlns="http://www.springframework.org/schema/beans" 
    12         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    13         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> 
     8<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     9    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> 
    1410 
    1511 
    16         <!-- HIBERNATE DAO --> 
    17         <bean id="muaSessionFactory" 
    18                 class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> 
    19                 <property name="dataSource"> 
    20                         <ref local="muac3p0DataSource" /> 
    21                 </property> 
    22                 <property name="hibernateProperties"> 
    23                         <props> 
    24                                   <prop key="hibernate.dialect"> org.hibernate.dialect.PostgreSQLDialect</prop> 
    25                              <!-- <prop key="hibernate.dialect"> org.hibernate.dialect.HSQLDialect</prop>--> 
    26                 <!--  <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect</prop>--> 
    27                                 <prop key="hibernate.show_sql">false</prop> 
    28                                 <prop key="hibernate.hbm2ddl.auto">update</prop> 
    29                         </props> 
    30                 </property> 
    31                 <!-- OR mapping files. --> 
    32                 <property name="mappingResources"> 
    33                         <list> 
    34                                 <value>uk/ac/cardiff/model/event/event.hbm.xml</value> 
     12    <!-- HIBERNATE DAO --> 
     13    <bean id="muaSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> 
     14        <property name="dataSource"> 
     15            <ref local="muac3p0DataSource" /> 
     16        </property> 
     17        <property name="hibernateProperties"> 
     18            <props> 
     19                <prop key="hibernate.dialect"> org.hibernate.dialect.PostgreSQLDialect</prop> 
     20                <!-- <prop key="hibernate.dialect"> org.hibernate.dialect.HSQLDialect</prop> --> 
     21                <!-- <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect</prop> --> 
     22                <!-- <prop key="hibernate.dialect"> org.hibernate.dialect.OracleDialect</prop> --> 
     23                <prop key="hibernate.show_sql">true</prop> 
     24                <prop key="hibernate.hbm2ddl.auto">update</prop> 
     25            </props> 
     26        </property> 
     27        <!-- OR mapping files. --> 
     28        <property name="mappingResources"> 
     29            <list> 
     30                <value>uk/ac/cardiff/model/event/event.hbm.xml</value> 
    3531                <value>uk/ac/cardiff/model/resource/resourcemetadata.hbm.xml</value> 
    3632                <value>uk/ac/cardiff/raptor/registry/releaseInformation.hbm.xml</value> 
    37                         </list> 
    38                 </property> 
    39         </bean> 
     33            </list> 
     34        </property> 
     35    </bean> 
    4036 
    4137 
    42         <bean id="muac3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" 
    43         destroy-method="close"> 
     38    <bean id="muac3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> 
    4439        <property name="driverClass"> 
    4540            <value>org.postgresql.Driver</value> 
     
    6156    </bean> 
    6257 
     58    <bean id="muac3p0DataSourceOracle" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> 
     59        <property name="driverClass"> 
     60            <value>oracle.jdbc.driver.OracleDriver</value> 
     61        </property> 
     62        <property name="jdbcUrl"> 
     63            <value>jdbc:oracle:thin:@didmodb01:1521:idmndev1</value> 
     64        </property> 
     65        <property name="properties"> 
     66            <props> 
     67                <prop key="c3p0.acquire_increment">5</prop> 
     68                <prop key="c3p0.idle_test_period">100</prop> 
     69                <prop key="c3p0.max_size">10</prop> 
     70                <prop key="c3p0.max_statements">0</prop> 
     71                <prop key="c3p0.min_size">10</prop> 
     72                <prop key="user">idman</prop> 
     73                <prop key="password">lhk27be</prop> 
     74            </props> 
     75        </property> 
     76    </bean> 
     77 
    6378 
    6479 
     
    6681 
    6782 
    68     <bean id="muac3p0DataSourceHSQLDB" class="com.mchange.v2.c3p0.ComboPooledDataSource" 
    69         destroy-method="close"> 
     83    <bean id="muac3p0DataSourceHSQLDB" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> 
    7084        <property name="driverClass"> 
    7185            <value>org.hsqldb.jdbcDriver</value> 
     
    92106        </property> 
    93107    </bean> 
    94      
    95     <!--  Users of MySQL can use the following c3p0 configuration as a template --> 
    96      
    97    <bean id="muac3p0DataSourceMySQL" class="com.mchange.v2.c3p0.ComboPooledDataSource" 
    98         destroy-method="close"> 
     108 
     109    <!-- Users of MySQL can use the following c3p0 configuration as a template --> 
     110 
     111    <bean id="muac3p0DataSourceMySQL" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> 
    99112        <property name="driverClass"> 
    100113            <value>com.mysql.jdbc.Driver</value> 
  • raptor-mua/trunk/src/main/config/logging.xml

    r1463 r1505  
    5151    <appender-ref ref="stdout"/> 
    5252  </logger> 
    53   <logger name="org.mortbay" level="ERROR"> 
     53  <logger name="org.eclipse.jetty" level="INFO"> 
    5454    <appender-ref ref="stdout"/> 
    5555  </logger> 
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/runtimeutils/ResourceMetadataComparator.java

    r1097 r1505  
    1414 * limitations under the License. 
    1515 */ 
     16 
    1617package uk.ac.cardiff.raptormua.runtimeutils; 
    1718 
    1819import java.util.Comparator; 
    1920 
    20 import org.mortbay.log.Log; 
    2121import org.slf4j.Logger; 
    2222import org.slf4j.LoggerFactory; 
     
    2424import uk.ac.cardiff.model.resource.ResourceMetadata; 
    2525 
    26 public class ResourceMetadataComparator implements Comparator<ResourceMetadata>{ 
    27          
    28         /** Class logger. */ 
     26public class ResourceMetadataComparator implements Comparator<ResourceMetadata> { 
     27 
     28    /** Class logger. */ 
    2929    private final Logger log = LoggerFactory.getLogger(ResourceMetadataComparator.class); 
    3030 
     31    /** 
     32     * Compares the <code>resourceId</code> from two <code>ResourceMetadata</code> instances. First it removes the 
     33     * protocol from the <code>resourceId</code> URL. Hence, it compares the hostname and path only. 
     34     */ 
     35    @Override 
     36    public int compare(ResourceMetadata one, ResourceMetadata two) { 
     37        String first = one.getResourceId(); 
     38        String second = two.getResourceId(); 
     39        if (first.contains("://")) { 
     40            first = first.substring(first.indexOf('/'), first.length() - 2); 
     41        } 
     42        if (second.contains("://")) { 
     43            second = second.substring(second.indexOf('/'), second.length() - 1); 
     44        } 
    3145 
    32         /** 
    33          * Compares the <code>resourceId</code> from two <code>ResourceMetadata</code> 
    34          * instances. First it removes the protocol from the <code>resourceId</code> URL. Hence, 
    35          * it compares the hostname and path only. 
    36          */ 
    37         public int compare(ResourceMetadata one, ResourceMetadata two) { 
    38                 String first = one.getResourceId(); 
    39                 String second = two.getResourceId(); 
    40                 if (first.contains("://")){ 
    41                         first = first.substring(first.indexOf('/'),first.length()-2); 
    42                 } 
    43                 if (second.contains("://")){ 
    44                         second = second.substring(second.indexOf('/'),second.length()-1); 
    45                 } 
    46                  
    47                 return first.compareTo(second); 
    48         } 
    49          
    50          
     46        return first.compareTo(second); 
     47    } 
    5148 
    5249} 
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/server/RunServer.java

    r1485 r1505  
    2323import java.util.TimeZone; 
    2424 
    25 import org.mortbay.jetty.Connector; 
    26 import org.mortbay.jetty.Handler; 
    27 import org.mortbay.jetty.Server; 
    28 import org.mortbay.jetty.bio.SocketConnector; 
    29 import org.mortbay.jetty.handler.DefaultHandler; 
    30 import org.mortbay.jetty.handler.HandlerCollection; 
    31 import org.mortbay.jetty.security.SslSocketConnector; 
    32 import org.mortbay.jetty.webapp.WebAppContext; 
     25import org.eclipse.jetty.server.Connector; 
     26import org.eclipse.jetty.server.Handler; 
     27import org.eclipse.jetty.server.Server; 
     28import org.eclipse.jetty.server.handler.ContextHandlerCollection; 
     29import org.eclipse.jetty.server.handler.DefaultHandler; 
     30import org.eclipse.jetty.server.ssl.SslSocketConnector; 
     31import org.eclipse.jetty.util.ssl.SslContextFactory; 
     32import org.eclipse.jetty.webapp.WebAppContext; 
    3333import org.slf4j.LoggerFactory; 
    3434 
     
    7676 
    7777        Server server = new Server(); 
    78         SslSocketConnector sslConnector = new SslSocketConnector(); 
     78 
     79        SslContextFactory contextFactory = new SslContextFactory(); 
     80 
     81        contextFactory.setKeyStorePath(keyStoreLocaion); 
     82        contextFactory.setKeyStorePassword(keyStorePassword); 
     83 
     84        contextFactory.setTrustStore(trustStoreLocaion); 
     85        contextFactory.setTrustStorePassword(trustStorePassword); 
     86        contextFactory.setNeedClientAuth(true); 
     87 
     88        SslSocketConnector sslConnector = new SslSocketConnector(contextFactory); 
    7989        sslConnector.setPort(portNumber); 
    8090        sslConnector.setMaxIdleTime(30000); 
    81         sslConnector.setKeystore(keyStoreLocaion); 
    82         sslConnector.setPassword(keyStorePassword); 
    83         sslConnector.setKeyPassword(keyStorePassword); 
    84         sslConnector.setTruststore(trustStoreLocaion); 
    85         sslConnector.setTrustPassword(trustStorePassword); 
    8691 
    87         SocketConnector connector = new SocketConnector(); 
    88         connector.setPort(portNumber); 
     92        // SocketConnector connector = new SocketConnector(); 
     93        // connector.setPort(portNumber); 
    8994 
    9095        // enable mutual authentication 
    91         sslConnector.setNeedClientAuth(true); 
    9296        System.out.println("Using Connector " + sslConnector); 
    9397        server.setConnectors(new Connector[] {sslConnector}); 
     
    98102        webappcontext.setWar(configurationFiles); 
    99103 
    100         HandlerCollection handlers = new HandlerCollection(); 
     104        ContextHandlerCollection handlers = new ContextHandlerCollection(); 
    101105        handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()}); 
    102106 
Note: See TracChangeset for help on using the changeset viewer.