Re: data persistence using hibernate

2023-01-25 Thread Vit Rozkovec
Check out JDBI as well. Vit On 25. 01. 23 3:23, Locke, Jonathan (Luo Shibo) wrote: JOOQ is good for me most of the time. Jon On Jan 24, 2023, at 6:34 PM, James Pollard wrote: I don't need hibernates added level of abstraction I was taught in the past to do database connectivity using

Re: data persistence using hibernate

2023-01-24 Thread Locke, Jonathan (Luo Shibo)
JOOQ is good for me most of the time. Jon On Jan 24, 2023, at 6:34 PM, James Pollard wrote: I don't need hibernates added level of abstraction I was taught in the past to do database connectivity using jdbc drivers/connectors, hikaricp just takes this a step further by providing a pool of

Re: data persistence using hibernate

2023-01-24 Thread James Pollard
I don't need hibernates added level of abstraction I was taught in the past to do database connectivity using jdbc drivers/connectors, hikaricp just takes this a step further by providing a pool of connections to use. Basically I've looked at orm frameworks in the past and just couldn't get my

Re: data persistence using hibernate

2023-01-23 Thread Martin Grigorov
On Tue, Jan 24, 2023 at 8:50 AM James Pollard wrote: > I've managed to make some progress with database connectivity, ended up > using hikaricp instead > HikariCP is a just a connection pool. I am not sure what exactly you mean with "instead". A connection pool is not a replacement of an ORM

Re: data persistence using hibernate

2023-01-23 Thread James Pollard
I've managed to make some progress with database connectivity, ended up using hikaricp instead However, I can't workout where the most appropriate place to put the connection pool close call, is there a close or shutdown function I can override so that the connection pool can be closed

Re: data persistence using hibernate

2022-12-26 Thread Vit Rozkovec
But I'm not sure where to put the following parts Session sess = sessionFactory.openSession(); ManagedSessionContext.bind(sess); This is done in some utility method when you retrieve the session for the first time in the request. You should also check if the session is already bound by

Re: data persistence using hibernate

2022-12-23 Thread James Pollard
Thanks Vit, I've defined the hibernate.cfg.xml file I've defined the following globally in the Application class private Configuration config = new Configuration(); private ServiceRegistry serviceRegistry; private SessionFactory sessionFactory; I've placed the following at the end of the init

Re: data persistence using hibernate

2022-12-22 Thread Ernesto Reinaldo Barreiro
Hi James, On Thu, Dec 22, 2022 at 2:24 PM James wrote: > Thanks for the guidance so far, that pointed me to find additional > resources on JPA > I believe I have this configured correctly, but I'm confused about how > to integrate JPA/Hibernate into a > pure wicket authenticated web application

Re: data persistence using hibernate

2022-12-22 Thread Vit Rozkovec
Hi, I'm currently using Hibernate without Spring and what you want to achieve can be done in several steps: - prepare your org.hibernate.cfg.Configuration - set Configuration's property: config.setProperty("hibernate.current_session_context_class", "managed"); - get SessionFactory by caling

Re: data persistence using hibernate

2022-12-21 Thread James
Thanks for the guidance so far, that pointed me to find additional resources on JPA I believe I have this configured correctly, but I'm confused about how to integrate JPA/Hibernate into a pure wicket authenticated web application project since the resource you directed me to previously seems

Re: data persistence using hibernate

2022-12-19 Thread Ernesto Reinaldo Barreiro
https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java This defines a JPA entity and this JPA/Hibernate

Re: data persistence using hibernate

2022-12-19 Thread James
I've had a look through it but couldn't find any reference to hibernate so far, its entirely possible that I managed to miss it while I was searching though Best Regards James Pollard james.poll...@iinet.net.au On 19/12/22 5:06 pm, Ernesto Reinaldo Barreiro wrote: Hi, This project

Re: data persistence using hibernate

2022-12-18 Thread Ernesto Reinaldo Barreiro
Hi, This project https://github.com/MarcGiffing/wicket-spring-boot contains a sample project that integrates with JPA/hibernate. On Mon, Dec 19, 2022 at 9:12 AM James wrote: > Hi, > can anyone direct me to any resources on how to integrate hibernate for > data persistence? > > the closest

data persistence using hibernate

2022-12-18 Thread James
Hi, can anyone direct me to any resources on how to integrate hibernate for data persistence? the closest I've managed to find is https://www.infoworld.com/article/2077901/web-development-with-wicket--part-3--many-ways-to-persist.html?page=7 but there's still things that are confusing me on