You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "David Pedowitz (JIRA)" <de...@velocity.apache.org> on 2008/10/28 00:11:45 UTC
[jira] Updated: (VELOCITY-637) JPA ResourceLoader
[ https://issues.apache.org/jira/browse/VELOCITY-637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Pedowitz updated VELOCITY-637:
------------------------------------
Attachment: EntityManagerResourceLoader.java
Attaching prototype, i've tested this using a spring configuration like so:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p" xmlns:security="http://www.springframework.org/schema/security"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-2.0.xsd">
... contents omitted ...
<bean id="velocityEngine"
class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
<property name="velocityPropertiesMap">
<map>
<entry key="resource.loader" value="em" />
<entry key="em.resource.loader.instance" value-ref="entityManagerResourceLoader" />
<entry key="em.resource.loader.resource.templateNamedQuery"
value="findEmailTemplateBodyByName" />
</map>
</property>
</bean>
<bean id="entityManagerResourceLoader"
class="org.apache.velocity.runtime.resource.loader.EntityManagerResourceLoader"
p:entityManagerFactory-ref="entityManagerFactory" />
</beans>
> JPA ResourceLoader
> ------------------
>
> Key: VELOCITY-637
> URL: https://issues.apache.org/jira/browse/VELOCITY-637
> Project: Velocity
> Issue Type: New Feature
> Reporter: David Pedowitz
> Attachments: EntityManagerResourceLoader.java
>
>
> Provide an JPA ResourceLoader, similar to the DataSource ResourceLoader but allowing for injection of an EntityManager(Factory) with configurable named queries.
--
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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org