[
https://issues.apache.org/jira/browse/TAPESTRY-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622451#action_12622451
]
Ernest Monklitch commented on TAPESTRY-2582:
--------------------------------------------
I thought that it would be possible to implement it so that if developer needs
to connect to only one database everything would be exactly as now.
Connecting to other databases would be possible if developer added one more
hibernate.cfg.xml file. The second file should be named
hibernateIdentifier.cfg.xml. Also entities package should be
entities.identifier.
Without identifier Tapestry would create the normal session that can be
Injected using just
@Inject
private Session session
The other session(s) should be accessed using
@Inject
@Service("Identifier")
private Session identifierSession
I don't know if this is too far-fetched, but I'm just adding this like I would
_like_ to use it. And this would be consistent approach with the convention
over configuration way of thinking.
This would introduce new things to @CommitAfter handling ofcourse (commit all
session instance's transactions) and it should also introduce new annotation
(Or parameter to @CommitAfter) witch would ofcourse be
@CommitAfter(value="identifier1,identifier2")
> Let Tapestry - Hibernate connect to multiple databases
> ------------------------------------------------------
>
> Key: TAPESTRY-2582
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2582
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9, 5.0.10,
> 5.0.11, 5.0.12, 5.0.13, 5.0.14
> Environment: All
> Reporter: Ernest Monklitch
> Fix For: 5.0.15
>
>
> Tapestry - Hibernate integration should include mechanism to connect to
> multiple databases via named sessions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]