org.molgenis
Class DatabaseConfig

java.lang.Object
  extended by org.molgenis.DatabaseConfig

@Configuration
public class DatabaseConfig
extends Object


Constructor Summary
DatabaseConfig()
           
 
Method Summary
 Database database()
          Entitymanager-per-HTTP-request pattern in a multi-user client/server application authenticated for current user
 javax.persistence.EntityManagerFactory entityManagerFactory()
           
 Login login()
           
 TokenFactory tokenFactory()
           
 Database unauthorizedDatabase()
          Entitymanager-per-HTTP-request pattern in a multi-user client/server application authenticated for system user
 Database unauthorizedPrototypeDatabase()
          Entitymanager-per-bean-request pattern in a standalone application Important: User is responsible for closing the Database instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseConfig

public DatabaseConfig()
Method Detail

database

@Bean(destroyMethod="close")
@Scope(proxyMode=TARGET_CLASS,
       value="request")
public Database database()
                  throws DatabaseException
Entitymanager-per-HTTP-request pattern in a multi-user client/server application authenticated for current user

Returns:
Throws:
DatabaseException

unauthorizedDatabase

@Bean(destroyMethod="close")
@Scope(proxyMode=TARGET_CLASS,
       value="request")
public Database unauthorizedDatabase()
                              throws DatabaseException
Entitymanager-per-HTTP-request pattern in a multi-user client/server application authenticated for system user

Returns:
Throws:
DatabaseException

unauthorizedPrototypeDatabase

@Bean
@Scope(value="prototype")
public Database unauthorizedPrototypeDatabase()
                                       throws DatabaseException
Entitymanager-per-bean-request pattern in a standalone application Important: User is responsible for closing the Database instance

Returns:
Throws:
DatabaseException

entityManagerFactory

@Bean(destroyMethod="close")
public javax.persistence.EntityManagerFactory entityManagerFactory()

login

@Bean
@Scope(proxyMode=TARGET_CLASS,
       value="session")
public Login login()

tokenFactory

@Bean
public TokenFactory tokenFactory()


Copyright © 2013. All Rights Reserved.