Note that there are some explanatory texts on larger screens.

plurals
  1. POCan Spring Security 3.1 use EclipseLink persistence unit?
    primarykey
    data
    text
    <p>I'm using Spring Security 3.1 with Spring 3.2 and with EclipseLink JPA. I'm configuring Spring Security to use users and groups from a MySQL database. All the Spring documentation and tutorials says to use </p> <pre><code>&lt;authentication-provider&gt; &lt;jdbc-user-service data-source-ref="dataSource" /&gt; &lt;/authentication-provider&gt; &lt;bean id = "dataSource" class = "org.springframework.jdbc.datasource.DriverManagerDataSource"&gt; &lt;property name = "driverClassName" value = "com.mysql.jdbc.Driver"/&gt; &lt;property name = "url" value = "jdbc:mysql://localhost:3306/webcosts"/&gt; &lt;property name = "username" value = "root"/&gt; &lt;property name = "password" value = "root"/&gt; &lt;/bean&gt; </code></pre> <p>However I've already defined my data source in persistence.xml similar to below</p> <pre><code>&lt;persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt; &lt;persistence-unit name="MyPersistenceUnit"&gt; &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt; &lt;properties&gt; &lt;property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" /&gt; </code></pre> <p>etc</p> <p>Is there any way to have the jdbc-user-service reference the persistence-unit directly or perhaps via an adapter, or do I need to enter my database information twice and have two sets of database connections?</p> <p>I've done a google search, and I've read the Spring documentation, but I can't find much. Spring documentation seems to be written by experts, for experts, it's not entirely intuitive for beginners to the framework!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload