public Collection getCars()

in itests/jpa-container-blueprint-testbundle/src/main/java/org/apache/aries/jpa/container/itest/bundle/blueprint/impl/CarServiceWithRequiresNew.java [49:65]


    public Collection<Car> getCars() {
        Car c = new Car();
        c.setNumberPlate("TR123");
        ServiceReference<CarService> ref = null;
        try {
            ref = getService();
            CarService carService = bundleContext.getService(ref);
            carService.addCar(c);
            final List<Car> returnVal = Arrays.asList(this.getCar("TR123"));
            carService.deleteCar("TR123");
            return returnVal;
        } finally {
            if (ref != null) {
                bundleContext.ungetService(ref);
            }
        }
    }