/** * Make bind() calls on the binder object to define most IoC services. Use service builder methods * (example below) when the implementation is provided inline, or requires more initialization * than simply invoking the constructor * * @param pBinder to use */ public static void bind(final ServiceBinder pBinder) { // This next line addresses an issue affecting GlassFish and JBoss - see // http://blog.progs.be/?p=52 javassist.runtime.Desc.useContextClassLoader = true; pBinder.bind(PhoneCatalog.class, PhoneCatalogImpl.class); pBinder.bind(UserDAO.class, UserDAOImpl.class); pBinder.bind(CommentDAO.class, CommentDAOImpl.class); }
public static void bind(ServiceBinder binder) { // Make bind() calls on the binder object to define most IoC services. // Use service builder methods (example below) when the implementation // is provided inline, or requires more initialization than simply // invoking the constructor. binder.bind(MyDomainObjectResource.class); }
public static void bind(ServiceBinder binder) { binder.bind(StringTransformer.class); }