Database shared connection between parent job and dynamic sub-job

One Star

Database shared connection between parent job and dynamic sub-job

Hello,
I'm using TOS DI 5.1.1 and i'm facing difficulties to use database shared connection between a parent job and a dynamic sub-job using postgres.
When i replace cal to the dynamic sub-job by a simple sub-job, the shared connection work fine : commit done in parent job save changes done in the sub-sob into the database.
But when i replace the call to the sub-job by a dynamic job, the commit does not save changes any more.
Is there a way to share database connection (and managed transaction) between a parent job and sub-job calling dynamicaly or is this functionnality not available for dynamical job ?

Attached files :
- parentJobWithDynamicSubJob.jpg : parent job calling sub-job dynamicaly (does not work)
- parentJobWithSubJob.jpg : parent job calling sub-job directly (work)
- subjob.jpg : sub-job

Regards,
Philippe
One Star

Re: Database shared connection between parent job and dynamic sub-job

Hi Philippe
That's because when you select the 'use dynamic job' feature, the child job will start a new JVM thread which doesn't share the same memory with the main job. It means when using 'Use dynamic job', you cannot use the "shared connection" feature at the same time.
Regards,
Pedro
One Star

Re: Database shared connection between parent job and dynamic sub-job

That is embarrassing, but thanks for your quick response.
Regards,
Philippe

Re: Database shared connection between parent job and dynamic sub-job

Thanks Guys,
I am able to share the DB connection with child sub jobs. I have written a small article with example to share the DB connection with child sub jobs.
http://vikramtakkar.blogspot.in/2013/03/sharing-database-connection-with-child.html

Vikram Takkar
http://vikramtakkar.blogspot.in
Five Stars

Re: Database shared connection between parent job and dynamic sub-job

Hi Vikram Takkar
I think we are looking for BD connection sharing with Dynamic Job, I am not able to see any reference in your article how to share DB Connection with Dynamic Job.
Community Manager

Re: Database shared connection between parent job and dynamic sub-job

Hi Vikram Takkar
I think we are looking for BD connection sharing with Dynamic Job, I am not able to see any reference in your article how to share DB Connection with Dynamic Job.

Hi umeshrakhe
Do you meant to use tRunJob to call a child job on the fly and share the db connection between parent job and child job?
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: Database shared connection between parent job and dynamic sub-job

Yes shong, i am looking for the same.

Re: Database shared connection between parent job and dynamic sub-job

Yes, we can not share DB connection with child jobs when the child sub jobs are run dynamically.