-
1. Re: Issue on VDB deployment order
shawkins May 24, 2012 11:26 AM (in response to buntylava)bunty,
Is the EJB obtaining a connection, or is this caused by pool pre-population? If it's the latter, then set the min pool size to 0.
If the EJB layer still has issues with inactive connections, then we probably want to consider adding a connection option to make the connection blocking until active.
Steve
-
2. Re: Issue on VDB deployment order
buntylava May 24, 2012 4:08 PM (in response to shawkins)JPA entity mappings are validated with datasource by obtaining a connections on deployment , I have tested my setting the pool size to 0, which has no effect. Can a dependency configuration be made using jboss-dependencies.xml or jboss-deployment.xml?
-
3. Re: Issue on VDB deployment order
shawkins May 24, 2012 9:30 PM (in response to buntylava)1 of 1 people found this helpfulThe VDBDeployer is hard-coded to use a relative deployment order of 3001, which is after the data sources are loaded. jboss-dependency.xml may be of some help, however there is no service/bean representing the active state of a VDB. It seems like an enhancement will be required.
-
4. Re: Issue on VDB deployment order
buntylava May 25, 2012 6:53 AM (in response to buntylava)Hi Steven,
If the service/bean representation for the VDB state is not available then jboss-dependencies.xml would not help for dynamic vdb deployment scenario. It does seem like a enhancement. Thanks for sharing the thoughts. Please update if found some way.I will do the same from my end, thanks again
Thanks
-
5. Re: Issue on VDB deployment order
rareddy May 25, 2012 7:49 AM (in response to buntylava)Bunty,
One workaround is deploying the Teiid Dynamic VDB in a separate JBoss AS instance than same instance EJB in.
The dependecy stuff you could possibly do it in the Teiid 8.0 with JBoss AS 7.1.1. In 7.7 changing the deployment order after EJB deployment number may work?
Ramesh..
-
6. Re: Issue on VDB deployment order
markaddleman May 25, 2012 8:38 AM (in response to rareddy)If I understand correctly, we have a similar need: Our application's VDB relies on subordinate VDBs to obtain structural information that gets processed in our app's translator's getMetadata method. Therefore, the application VDB should not start until the subordinate VDB is ready.
Currently, the application VDB polls the subordinate VDB waiting for it to be ready. Our application also dynamically produces VDBs using Teiid's admin API so a JBoss beans notification would be cumbersome. A callback mechanism from the Admin api would be preferable.
If this makes sense, I'll submit a jira
-
7. Re: Issue on VDB deployment order
rareddy May 25, 2012 8:43 AM (in response to markaddleman)Admin interface can *not* be used with push model. It is pull only. This is based on JBoss AS profile services.
-
8. Re: Issue on VDB deployment order
shawkins May 25, 2012 11:41 AM (in response to rareddy)For 7.7 the simplest enhancement would be to just add optional vdb polling into the JDBC connection logic, unless Ramesh you know of some other AS tricks we could employ.
For 8.1 it would probably make sense to rethink the whole status active/inactive logic. It was a fairly clean concept back in the MMX days, however now it is inconsistent as datasources can be removed indepenently of consuming vdbs. So transitioning to the inactive state is meaningless to connections that have already been made.
I would propose using the statuses:
LOADING
ACTIVE
INVALID - if there is a metadata validation failure or a source missing
We would also change the logic to not inhibit making a connection regardless of the status. The DQP getMetadata and executeRequest calls are the only ones that would need to enforce that the vdb is out of the loading state before proceeding. To make this work as an asynch callback getMetadata would also need to return a Future and the work on those would delayed until a vdblifecyclelistener reports that the target vdb has finished loading.
As long as the engine is running and the vdb is deployed, then client connections will succeed. The question would then be for local jndi connections how do we wait until the vdb is deployed. Ramesh is there a simply way in the AS to have a DataSource dependent upon a VDBService?
-
9. Re: Issue on VDB deployment order
rareddy May 25, 2012 12:11 PM (in response to shawkins)All I was thinking is checking out the EJB deployer's deployment order and make VDB deployment order after it, do not know if that is sufficient.
I do not think we can create a dependency on foreign services, you can only listen to their events.
-
10. Re: Issue on VDB deployment order
markaddleman May 25, 2012 5:25 PM (in response to shawkins)*We* don't need a solution for the 7.7 line. We're basing our next release off of the 8.x line.
If I understand the implication of making the loading async (using futures), then the VDBs are immediately available and clients could use standard JDBC timeout methods to control how long to wait before the VDB ultimately becomes ready. That is a nice consequence.
-
11. Re: Issue on VDB deployment order
rareddy May 26, 2012 8:48 AM (in response to shawkins)Steve,
For local JNDI connections, with every data source there is implicit service gets created in the AS7. Since they are in same JVM, solution is to place a listener on this service and only grant the connection at that point or timeout.
Ramesh..
-
12. Re: Issue on VDB deployment order
shawkins May 31, 2012 3:31 PM (in response to rareddy)https://issues.jboss.org/browse/TEIID-2059 was resolved, but only for 8.1. I'm still not sure if there is a good workaround in 7.7 for bunty, so we may need to open an issue there as well.
Steve