سؤال

I am new to EJB and worked a bit on spring, while creating the application what I do is I use the previous structure of my application and configuration as it is. When I get into trouble I saw no of solution each with different style of configuration pattern. I want to know about how many ways we can configure database/datasource/connection pooling in Spring/EJB applications. One more thing what I see is some of the developers put some values(such as username, password) withing persistence.xml while some others keep them in a properties file and then read them. I want a full understanding of what can go where and in how many ways. What are the benefits of using a particular pattern.

I also want to know about how to get the list of properties. for example.. while using hibernate and eclipselink various properties we mention in persistence.xml, where these properties are defined. where can I get the exact explanation or list of such properties.

هل كانت مفيدة؟

المحلول

For the full list of persistence unit properties for EclipseLink, see,

http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/persistenceproperties_ref.htm#sthref742

You can put any of these in the persistence.xml file, or can pass any of them in a properties Map to Persistence.createEntityManagerFactory().

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top