[JBoss Seam] - Problem finding seam.quartz.properties
by supernovasoftware.com
I have been using quartz with my apps by declaring the config file in jboss-apps.xml
<jboss-app>
| <loader-repository>
| seam.jboss.org:loader=XXXXXX
| </loader-repository>
| <module>
| <service>quartz-service.xml</service>
| </module>
| <module>
| <service>login-conf.sar</service>
| </module>
| </jboss-app>
Now that I am using Seam 2.0.0.CR2 I would like to use the built in integration.
To enable this I did the following:
1. Add the following to my components.xml located in WEB-INF of the war.
| <!-- Install the QuartzDispatcher -->
| <async:quartz-dispatcher/>
|
2. Place seam.quartz.properties in my jar which is listed as
<module>
| <ejb>XXXXX.jar</ejb>
| </module>
in my application.xml
No matter what I do it will not see seam.quartz.properties. I have looked over the quartz example and it finds this file with no problems.
I would greatly appreciate any advice on getting this working.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094302#4094302
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094302
18Â years, 9Â months
[EJB 3.0] - Re: How to connect multiple databases at same time?
by kmagnant
This is a question frequently asked, but not answered. I am having a similar issue: I need to determine the schema (PersistenceUnit) to use at runtime - actually on a per request basis.
Has this nut been cracked? Ideally I would like to still be able to use JTA and let the container take care of the transaction details. Below I try to summarize the approach I have been trying, but it doesn't feel right. If you know of any examples or references that address this issue I would be grateful.
I am using jBoss 4.2.1 as it was downloaded with the exception of defining the data sources, which are all defined in one file, all are local-tx-datasources.
Based on user entered criteria, I need to determine which schema to use. The structure of each schema is identical so the Entity beans are properly defined for the each possible schema.
I have been able to get things working for read requests by using a static EntityFactoryLocator that returns the proper EntityManager given some decision criteria. Apparently when you use a helper class to get the EntityManager, your transaction type must be set to RESOURCE-LOCAL. So, the session facade that wraps the entity calls EntityFactoryLocator(decisionCriteria).getEntityManager().
When a session facade method needs to do an update, I run into an issue where the update works in the correct schema, but I am unable to close the entityManager so the corresponding connection is never released back to the pool. This is likely related to the fact that I have an EXTENDED persistence context - that I don't know how to change. My code, in the session facade, looks like:
// update one entity
EntityTransaction transaction = entityManager.getTransaction();
transaction.begin();
if (query.executeUpdate() == 1) {
entityManager.commit(); // Blows up if not commented out. java.sql.SQLException: You cannot commit during a managed transaction!
entityManager.close();
}
else rollback, clean up, and throw some exception
I know I have issues with the above. When in debug mode I see that the persistenceContext is EXTENDED.
Thanks for looking.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094300#4094300
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094300
18Â years, 9Â months