public Actor insert(Actor actor) {
		if (actor == null)
			return null;

		try {

			Connection connection = DataSourceUtils.getConnection(dataSource);

			PreparedStatement statement = connection.prepareStatement(
					"INSERT INTO actor (name, last_name) " + "VALUES (?, ?)",
					Statement.RETURN_GENERATED_KEYS);

			statement.setString(1, actor.getName());
			statement.setString(2, actor.getLName());

			statement.executeUpdate();

			ResultSet resultSet = statement.getGeneratedKeys();

			if (resultSet != null && resultSet.next())
				actor.setId(resultSet.getInt(1));
			//connection.close();
		} catch (SQLException e) {
			throw new RuntimeException(e);
		}

		return actor;
	}