|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpalio.connectors.Connector
palio.connectors.hibernate.HibernateConnector
public class HibernateConnector
Hibernate connector is used to integrate Hibernate framework with jPALIO. There is possible to define many Hibernate connectors in one jPALIO instance.
Hibernate connector configuration
There are two ways to configure hibernate connector
Environment class. configFile (above) parameter is not specified.
If mapping classes sources are stored in jPALIO objects, there is no need to specify mapping classes in connector configuration (
mapClasses). For that classes special object type should be used: JPA Mapping Class. While configuring/reconfiguring
all jPALIO objects with this type are selected from database and added to the configuration (only assigned to the connector - see below).
Parameters from connector configuration are more important than parameters from Hibernate configuration file/object. Parameters from config file/object will be overwritten by connector parameters.
IMPORTANT! All mapping classes must be assigned to any connector. The assignement must be made by Assigned annotation. If
not assigned, class will be omitted.
Assigned| Constructor Summary | |
|---|---|
HibernateConnector(java.lang.String url,
java.util.Properties properties)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
dedicatedCommit()
|
void |
dedicatedRollback()
|
void |
dedicatedStart()
|
void |
dedicatedStop()
|
org.hibernate.Session |
getCurrentSession()
Returns current hibernate session |
org.hibernate.Session |
getNewSession()
Returns new hibernate session |
void |
init()
|
boolean |
isTransaction()
|
void |
refresh()
|
| Methods inherited from class palio.connectors.Connector |
|---|
getConnector, getInfo, getInstance, getName, getUrl, info, init, setDedicatedLogConfiguration, setInstance |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HibernateConnector(java.lang.String url,
java.util.Properties properties)
| Method Detail |
|---|
public org.hibernate.Session getCurrentSession()
public org.hibernate.Session getNewSession()
public void init()
throws palio.PalioException
init in class Connectorpalio.PalioExceptionpublic void close()
close in class Connector
public void refresh()
throws palio.PalioException
refresh in class Connectorpalio.PalioException
public void dedicatedCommit()
throws palio.PalioException
dedicatedCommit in interface DedicatedConnectionSupportpalio.PalioException
public void dedicatedRollback()
throws palio.PalioException
dedicatedRollback in interface DedicatedConnectionSupportpalio.PalioException
public void dedicatedStart()
throws palio.PalioException
dedicatedStart in interface DedicatedConnectionSupportpalio.PalioException
public void dedicatedStop()
throws palio.PalioException
dedicatedStop in interface DedicatedConnectionSupportpalio.PalioException
public boolean isTransaction()
throws palio.PalioException
isTransaction in interface DedicatedConnectionSupportpalio.PalioException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||