IPixels metadataService = (IPixels) serviceFactory.getContext() .getBean(IPixels.class.getName());
IPixels metadataService = serviceFactory.getPixelsService();
    public void setPixelsId( long pixelsId )    {        if ( id == null || id.longValue() != pixelsId )        {            id = new Long( pixelsId );            pixelsInstance = null;            buffer = null;            IPixels metadataService = (IPixels) serviceFactory.getContext()                .getBean(IPixels.class.getName());            PixelsService dataService = (PixelsService)             applicationContext.getBean("/OME/OMEIS/Pixels"); // FIXME in SFactory.            pixelsInstance = metadataService.retrievePixDescription( id );            try            {                buffer = dataService.createPixelBuffer( pixelsInstance );            } catch (IOException e)            {                e.printStackTrace();                // TODO this could throw a ResourceError anyway.                throw new ResourceError(                        "Failed to create PixelBuffer:\n"                        +e.getMessage());            }        }    }