[Design of JBoss jBPM] - Re: Improvig timer
by brittm
Like most folks, I guess, I've implemented an ActionHandler to dynamically modify due dates on tasks and timers. And like you mention Tom, there typically needs to be a dynamic date/time reference from the process instance as well as a static modifier...such as
<timer name="xyz" baseDateTime="#{someJava.util.Date}" addDuration="1 business day"></timer>
|
Use case: I have an established deadline for a customer install, and this task/timer needs to come due 1 business day ahead of that deadline...
<timer name="xyz" baseDateTime="#{deadlineDate}" addDuration="-1 business day"></timer>
|
or the same for a task...
<task name="xyz" baseDateTime="#{deadlineDate}" addDuration="-1 business day" .../>
-Britt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109052#4109052
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109052
16 years, 5 months
[Design of POJO Server] - Re: Embbedded - broken - some fixes - still not working
by adrian@jboss.org
"epbernard" wrote :
| Even if we define a proprietary abstraction implemented by JBoss AS and passed as an argument to createContainerEntityManagerFactory (in the Map), it does not solves the whole problem.
| JBoss AS has to conform to the PersistenceUnitInfo contract so that other providers can bootstrap :)
I'm not saying don't support the spec. I'm saying we can optimize it.
There are really two seperate issues:
1) The embedded stuff where we don't require a packaging step to run tests,
we create a VFS context that collects the disparate resources from across
the IDE project. A sort of in memory symbolic link.
See the VFSTestCase in the embedded project.
2) Optimizing the scanning/parsing of the class files for annotations.
Scanning we can trim the list the list to speed things up
since we already did the scan and know which are @Entity.
And we've already parse those classes that do match.
The issue that started this thread was (1).
(2) is a nice to have. At the moment we have EJB3, Hibernate, Tomcat, AOP
and in the future the MC all needing to scan packages for annotated classes.
Doing it N times for N different modules is just a waste.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109027#4109027
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109027
16 years, 5 months
[Design of POJO Server] - Re: Embbedded - broken - some fixes - still not working
by epbernard
Hey guys,
There are some reasons why I assume either a JAR structure or a directory from these URLs.
The contract between the app server and the persistence provider is defined by javax.persistence.spi.PersistenceUnitInfo
When the container creates a PU, it calls
/**
| * Called by the container when an EntityManagerFactory
| * is to be created.
| *
| * @param info Metadata for use by the persistence provider
| * @param map A Map of integration-level properties for use
| * by the persistence provider (may be null if no properties
| * are specified).
| * @return EntityManagerFactory for the persistence unit
| * specified by the metadata
| */
| public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map);
Specifically the interesting bits of the contract are
/**
| * Interface implemented by the container and used by the
| * persistence provider when creating an EntityManagerFactory.
| */
| public interface PersistenceUnitInfo {
| [...]
|
| /**
| * @return The list of JAR file URLs that the persistence
| * provider must examine for managed classes of the persistence
| * unit. Each jar file URL corresponds to a named <jar-file>
| * element in the persistence.xml file.
| */
| public List<URL> getJarFileUrls();
|
| /**
| * @return The URL for the jar file or directory that is the
| * root of the persistence unit. (If the persistence unit is
| * rooted in the WEB-INF/classes directory, this will be the
| * URL of that directory.)
| */
| public URL getPersistenceUnitRootUrl();
|
| [...]
| }
The reading of the JavaDoc (and the intend of the spec) is that the persistence provider expect either a directory or a JAR file.
I scan the root URL for 3 reasons:
- get the annotated classes
- get hbm.xml files
- get ORM.xml files
2 is proprietary to Hibernate of course.
Even if we define a proprietary abstraction implemented by JBoss AS and passed as an argument to createContainerEntityManagerFactory (in the Map), it does not solves the whole problem.
JBoss AS has to conform to the PersistenceUnitInfo contract so that other providers can bootstrap :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109018#4109018
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109018
16 years, 5 months