java - JPA/Hibernate - Is it safe to change the connection whilst serving a request? -


i using jpa2/hibernate 5 in project. have enabled multi-schema support. within web-application every time new user created, schema created user by:

 connection.createstatement().execute("create schema " + tenantidentifier + "");         connection.createstatement().execute("use " + tenantidentifier + "");         schemaexport export = new schemaexport(                 (metadataimplementor) metadatasources.buildmetadata(),                 connection);         export.create(true, true); 

if 2 web requests made @ same time, 1 created new schema , tried fetch data different schema, data access issue happen or connection object session using created per request? db interactions handled spring's jpa repositories. using spring boot


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -