Remove duplicate mock classes; updated version of annotation and transaction dependencies
This commit is contained in:
parent
47e7583ada
commit
1ffd308bbe
|
@ -118,9 +118,8 @@
|
|||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.transaction</artifactId>
|
||||
<version>1.1.1.v201105210645</version>
|
||||
<groupId>javax.transaction</groupId>
|
||||
<artifactId>javax.transaction-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -132,7 +131,6 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.mail.glassfish</artifactId>
|
||||
<version>1.4.1.v201005082020</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -141,9 +139,8 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.annotation</artifactId>
|
||||
<version>1.1.0.v201108011116</version>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
//
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
//
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
//
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package com.acme;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* MockDataSource
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MockDataSource implements DataSource
|
||||
{
|
||||
|
||||
/**
|
||||
* NOTE: JDK7+ new feature
|
||||
*/
|
||||
public Logger getParentLogger()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.sql.DataSource#getConnection()
|
||||
*/
|
||||
public Connection getConnection() throws SQLException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.sql.DataSource#getConnection(java.lang.String, java.lang.String)
|
||||
*/
|
||||
public Connection getConnection(String username, String password)
|
||||
throws SQLException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.sql.DataSource#getLogWriter()
|
||||
*/
|
||||
public PrintWriter getLogWriter() throws SQLException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.sql.DataSource#getLoginTimeout()
|
||||
*/
|
||||
public int getLoginTimeout() throws SQLException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.sql.DataSource#setLogWriter(java.io.PrintWriter)
|
||||
*/
|
||||
public void setLogWriter(PrintWriter out) throws SQLException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.sql.DataSource#setLoginTimeout(int)
|
||||
*/
|
||||
public void setLoginTimeout(int seconds) throws SQLException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public boolean isWrapperFor(Class<?> iface) throws SQLException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
//
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
//
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
//
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package com.acme;
|
||||
|
||||
import javax.transaction.HeuristicMixedException;
|
||||
import javax.transaction.HeuristicRollbackException;
|
||||
import javax.transaction.NotSupportedException;
|
||||
import javax.transaction.RollbackException;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
/**
|
||||
* MockUserTransaction
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MockUserTransaction implements UserTransaction
|
||||
{
|
||||
|
||||
/**
|
||||
* @see javax.transaction.UserTransaction#begin()
|
||||
*/
|
||||
public void begin() throws NotSupportedException, SystemException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.transaction.UserTransaction#commit()
|
||||
*/
|
||||
public void commit() throws HeuristicMixedException,
|
||||
HeuristicRollbackException, IllegalStateException,
|
||||
RollbackException, SecurityException, SystemException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.transaction.UserTransaction#getStatus()
|
||||
*/
|
||||
public int getStatus() throws SystemException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.transaction.UserTransaction#rollback()
|
||||
*/
|
||||
public void rollback() throws IllegalStateException, SecurityException,
|
||||
SystemException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.transaction.UserTransaction#setRollbackOnly()
|
||||
*/
|
||||
public void setRollbackOnly() throws IllegalStateException, SystemException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.transaction.UserTransaction#setTransactionTimeout(int)
|
||||
*/
|
||||
public void setTransactionTimeout(int arg0) throws SystemException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue