mardi 7 juillet 2015

JavaEE Datasource/SecurityRealm at bootstrapping/setup a webapp

is there a way to configure (and save) a datasource and Security Realm at boot-time of a webapp? if i look at Atlassian Jira or Confluence there is a Setup-Process where i can chose a database type (e.g. MySql), the connection url and so on. For first start of one of this application i guess this data is in memory but after restart this data has to be read from a file ( i think so). But i cant find a file called persistence.xml.Same with SecurityRealm. Normally a SecurityRealm is defined e.g. in server.xml (and there between ). i have looked at all .xml files of this applications but not find a SecurityRealm. Can anybody help me and explain (step by step) how can i setup a SecurityRealm without touch one of the xml files of a servlet container and how i can setup a datasource at first start of a webapp (and store this data in a file to read this data at the next time of starting the app?

Aucun commentaire:

Enregistrer un commentaire