Hi to All,
2 days ago, i post a message abt how to automatically invoke a java program whenever ofbiz startup.... scott gave one idea abt this The ofbiz-containers.xml file in /base/ If you create a class that implements org.ofbiz.base.container and register it in the containers file like this: <container name="my-java-thread-container" class="my.custom.container.MyJavaThreadContainer"/> then ofbiz will call init(...) and start() on your class during startup and then stop() during shutdown. The containers are loaded in the order they are listed in the file. my class that implements org.ofbiz.base.container.Container class. but i don't know how to override init(),start(),stop() in my class scott give ur solution little bit breifly.... some friends in our forum, gave solution.... i couldn't make it up.... Please give me ur thoughts and ideas... it is more urgent.... |
to go into detail on the ml list is beyond the ML scope.
we give pointers to get you going but you have to dig for the answers unless you want to hire someone to consult with you. as a pointer I suggest you look at the mail container. it will show you all the things you need to know. saravanan6 sent the following on 9/19/2010 10:51 PM: ========================= BJ Freeman Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52> Specialtymarket.com <http://www.specialtymarket.com/> Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man > > Hi to All, > > 2 days ago, i post a message abt how to automatically > invoke a java program whenever ofbiz startup.... > > scott gave one idea abt this > > The ofbiz-containers.xml file in /base/ > If you create a class that implements org.ofbiz.base.container and register > it in the containers file like this: > <container name="my-java-thread-container" > class="my.custom.container.MyJavaThreadContainer"/> > then ofbiz will call init(...) and start() on your class during startup and > then stop() during shutdown. > > The containers are loaded in the order they are listed in the file. > > my class that implements org.ofbiz.base.container.Container class. but i > don't know how to override init(),start(),stop() in my class > > scott give ur solution little bit breifly.... > > > some friends in our forum, gave solution.... i couldn't make it up.... > > Please give me ur thoughts and ideas... > > > it is more urgent.... > > |
In reply to this post by saravanan6
You just have to invoke your program from inside start() method of your
container. What is the issue? Bilgin On Mon, Sep 20, 2010 at 6:51 AM, saravanan6 <[hidden email]> wrote: > > Hi to All, > > 2 days ago, i post a message abt how to automatically > invoke a java program whenever ofbiz startup.... > > scott gave one idea abt this > > The ofbiz-containers.xml file in /base/ > If you create a class that implements org.ofbiz.base.container and register > it in the containers file like this: > <container name="my-java-thread-container" > class="my.custom.container.MyJavaThreadContainer"/> > then ofbiz will call init(...) and start() on your class during startup and > then stop() during shutdown. > > The containers are loaded in the order they are listed in the file. > > my class that implements org.ofbiz.base.container.Container class. but i > don't know how to override init(),start(),stop() in my class > > scott give ur solution little bit breifly.... > > > some friends in our forum, gave solution.... i couldn't make it up.... > > Please give me ur thoughts and ideas... > > > it is more urgent.... > > > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/i-didn-t-get-the-solution-for-automatically-load-a-java-program-when-ofbiz-startup-tp2546548p2546548.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Hi Bilgin,
Thank you very much for your reply...... I eagerly waiting for the past one week.... now i got the solution from your answer... thanks a lot..... Actually today is my deadline.... you saved me a lot Earlier i was wrote the code inside my container itself... so, it raise startupExpception while running... now, i wrote separate class and invoke that program from my container it works fine...... and one more doubt bilgin.... can i use thread in my class and activate that thread whenever ofbiz start? |
Sure you can. Actually I have done very similar thing before some time:
created a new container and in from its start() method created threads listening for socket connections... Bilgin can i use thread in my class and activate that thread whenever ofbiz start? > > > > > > > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/i-didn-t-get-the-solution-for-automatically-load-a-java-program-when-ofbiz-startup-tp2546548p2553037.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
thanks a lot Bilgin......
On Sat, Sep 25, 2010 at 1:31 AM, Bilgin Ibryam-2 [via OFBiz] <[hidden email]> wrote: Sure you can. Actually I have done very similar thing before some time: -- Thanks & Regards, Saravanan.P +919965317349. *************************************************************************************** Never Design your life like GARDEN, any one can walk...! So, Design your life like SKY where every one has aspire to reach...! *************************************************************************************** |
Free forum by Nabble | Edit this page |