One Star

[resolved] How I deploy a service in Karaf if there is trunjob in that service?

Hello,
I am going to deploy my service in karaf but in that service six 'trunjob' and the service is not showing when I wrote bundles:list command in karaf. When I am deploying a service is there any need of put the jar files of jobs in deploy folder or something else.
Thanks a lot,

Regards,
Sanjay
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] How I deploy a service in Karaf if there is trunjob in that service?

Hi Sanjay, how are you deploying your services?
This is really a Karaf rather than a Talend concept however Talend allows one to export a piece of work as a JAR, WAR and a KAR. Talend has done some neat work around generating OSGI Bluprints, thumbs up for this.
If you are going to just be testing on your local machine and as you mention the packaged services are not going to be running in a container such as weblogic or tomcat for argument sake.
Right click the service and in the context menu select Export Service. In the ensuing wizard point the kar to your $TALEND_HOME/runtime/deploy folder and hit finish.
If your container is up and you have not changed anything check the following.
tail -f $TALEND_HOME/runtime/log/tesb.log to see the deployment. Karaf has a hot deployment when a file in the deploy directory is updated.
Go to http://localhost:8040/services and CXF will display all the deployed WSDL's and WADLs
A good place to start may be karaf.apache.org as this is a very small part of the containers features. One can use commands such as
cxf:list-endpoints search through the end points to see if your nw service has started.
tesb:stop-all
tesb:start-all
you can install features etc. the karaf console is quite detailed
The Console can also be reached at http://localhost:8040/system/console/
In short you do not need to worry about packaging of JARs etc Talend Studio does this for you when you export a standalone Job or Service. When you export a service to a KAR all the jobs are built and packaged into the KAR. NOTE what your default context is at this point.
They have put in some good effort around maven (Her and I have a love hate relationship that has spanned many years Smiley Happy )
Packaging etc amongst many other things.

Graham
4 REPLIES
One Star

Re: [resolved] How I deploy a service in Karaf if there is trunjob in that service?

Hi Sanjay, how are you deploying your services?
This is really a Karaf rather than a Talend concept however Talend allows one to export a piece of work as a JAR, WAR and a KAR. Talend has done some neat work around generating OSGI Bluprints, thumbs up for this.
If you are going to just be testing on your local machine and as you mention the packaged services are not going to be running in a container such as weblogic or tomcat for argument sake.
Right click the service and in the context menu select Export Service. In the ensuing wizard point the kar to your $TALEND_HOME/runtime/deploy folder and hit finish.
If your container is up and you have not changed anything check the following.
tail -f $TALEND_HOME/runtime/log/tesb.log to see the deployment. Karaf has a hot deployment when a file in the deploy directory is updated.
Go to http://localhost:8040/services and CXF will display all the deployed WSDL's and WADLs
A good place to start may be karaf.apache.org as this is a very small part of the containers features. One can use commands such as
cxf:list-endpoints search through the end points to see if your nw service has started.
tesb:stop-all
tesb:start-all
you can install features etc. the karaf console is quite detailed
The Console can also be reached at http://localhost:8040/system/console/
In short you do not need to worry about packaging of JARs etc Talend Studio does this for you when you export a standalone Job or Service. When you export a service to a KAR all the jobs are built and packaged into the KAR. NOTE what your default context is at this point.
They have put in some good effort around maven (Her and I have a love hate relationship that has spanned many years Smiley Happy )
Packaging etc amongst many other things.

Graham
One Star

Re: [resolved] How I deploy a service in Karaf if there is trunjob in that service?

Hi Graham,
thanks a lot for replying. I just want to know that if I make a kar file of the main service, which including all the trun job then I d'nt have to make the jar of jobs and put it into deploy folder?
Your one answered realy help me a lot that is tail -f $TALEND_HOME/runtime/log/tesb.log shows deployment of the service. Thanks again
regards,
sanjay
One Star

Re: [resolved] How I deploy a service in Karaf if there is trunjob in that service?

Hi Sanjay, when a Job or a Service is exported all dependencies ARE INCLUDED in the archive. Be it a JAR or a KAR.
If you explode the archive you should see the JobName.class in your archive
Graham
One Star

Re: [resolved] How I deploy a service in Karaf if there is trunjob in that service?

Hi Graham,
I understand it before my second post but for confirmation I asked you again. thanking you,
Best Regards
Sanjay