Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to hide my connection details from diff clients in hibernate configuration file

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I developed a standalone application which uses hibernate for its persistance logic and uses mysql database on php server hosting.
as we know hibernate logic is with my standalone app at client side.
So now i want to run that app on multiple machines.

In hibernate we write configuration file in which we should give connection url as property along with username and password of database.
So is there any way that i can hide this configuration file and still make my hibernate app work on multiple systems.

Since all can see my hibernate configuration file so anyone can use my database details and get access.

please hepl me out.
Thanks in advance.

 
Ranch Hand
Posts: 177
Hibernate Python Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can delete those entries from the xml and pass them to hibernate after configuration like:
 
rajesh vasireddy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Manuel Petermann wrote:You can delete those entries from the xml and pass them to hibernate after configuration like:



Here what is this "uData", is it a POJO class with static methods?
I am sorry i am new so please explain little more closely.
Thanks for the help.
 
Manuel Petermann
Ranch Hand
Posts: 177
Hibernate Python Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My bad, i should have modified it a bit more to make it clearer. I grab the user credentials from a login screen and store them in an object which is given to my hibernate SessionBuilder facory.
Those are just two Strings.
You need to be a bit creative to catch the exception if the password or username are wrong though.
 
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic