Welcome Georgios!
Java EE servers are required to provide a default datasource. Creating a persistence.xml without a specific datasource must work on all servers.
You can also define datasources with the @DataSourceDefinition annotation or via web.xml at application level. The same applies to JMS resources and JCA resource adapter administer objects.
It's true that integration between application defined datasources and JPA is a bit unclear at spec level but I think it works on most servers now.
A real problem that has made it useless in practice is the need to specify database pssswords in plain text on a constant. Recently the Security spec (JSR 375) solved it by using _expression_ Language expressions, but I expect this all to be handled by the new Config JSR that's already in the making.
Note also that Java EE 8 originally contained a new Management API JSR that aimed to provide a standard API to configure servers, but it was untimately withdrawn.
I'm not sure this is exactly what you meant. Does it solve part of your concern?
Regards,
Guillermo González de Agüero
Hello everyone ,
Based in my personal experience as a young developer in Java EE ecosystem i think Java EE AS lacks of a central configuration system.
As a result it makes difficult for young developers to get started.
If you want to configure something you have to edit xml files or use AS's specific cli tools.
For example to connect in a database in Payara , you just provide the persistence.xml.
To achieve the same in Wildfly you must provide persistence.xml and configure the datasource in AS.
To simplify this we can have a file(config.json) and provide project's spesific configuration.
example
{
"profile" : "full|web|micro"
"datasources" : [],
"app-server-config" : {
}
}
Based on the above idea we can get rid of persistance.xml or even any other *.xml files.
P.S. take it easy on me , it's the first time that i'm writing to a mailing list :-)
Thank you,
Georgios Bourantas
_______________________________________________
ee4j-community mailing list
ee4j-community@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ee4j-community
_______________________________________________
ee4j-community mailing list
ee4j-community@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ee4j-community