> hello everyone! > i am trying to write a script that will use tapestry-hibernate to > will do some database processing tasks from a command line. It also needs to > access IOC Services:
> public static void main(String[] args) { > RegistryBuilder builder = new RegistryBuilder(); > builder.add(HibernateCoreModule.class); > Registry registry = builder.build(); > registry.performRegistryStartup(); > HibernateSessionSource hello = registry > > .getService(HibernateSessionSource.class); > Session session = > hello.getSessionFactory().openSession(); > > Something something = new Something(); > something.setName("test"); > session.persist(type); session.getCurrentTransaction().commit(); > registry.cleanupThread(); > registry.shutdown(); > } > could it work like that or is there something fundamentally wrong here or > missing? > thanks! --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org