Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-01-2007
gumshoe gumshoe is offline
Registered User
 
Name: Ruedi Eder
Organization: Enbridge
Project: Enterprise wide IPC framework.
 
Join Date: Dec 2006
Posts: 18
Wrapping Ice.Application with Java

Hi,

I have gotten a number of Ice applications working using Java and now am trying to make a class that completely wraps all the Ice calls, thus allowing classes that do not implement Ice.Application to use Ice.

My question is about Ice.Communicator startup; is checking for communicator() != null good enough to ensure that the core us up and running?

I have a class that extends Ice.Application and in its init() it starts a thread that starts the Ice core by calling Ice.Application.main() which consists of communicator().waitForShutdown(). init() then waits until communicator() != null before exiting. At this point Ice communication can occur and other classes can use any Ice calls that it wraps.

Is this reasonable or is there some other suggested method of doing this that I am not aware of?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 02-01-2007
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
Hi,

Is there any particular reasons why you need to use Ice.Application?

It seems to me that your init() method just needs to create a communicator. Note that you don't have to use Ice.Application to initialize the Ice runtime, you can simply create a communicator. For an example, see demo/Ice/minimal (which doesn't use Ice.Application). The section "3.4 Writing an Ice Application with Java" in the Ice manual also shows how to create a communicator.

Cheers,
Benoit.
Reply With Quote
  #3 (permalink)  
Old 02-01-2007
gumshoe gumshoe is offline
Registered User
 
Name: Ruedi Eder
Organization: Enbridge
Project: Enterprise wide IPC framework.
 
Join Date: Dec 2006
Posts: 18
Ignorance is the only reason; thanks.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IceV3.11 java client and vc7.0Server : java.lang.NullPointerException? zhoubin Help Center 2 11-24-2006 04:03 AM
About IM Application! ffmpeg4nmm Help Center 4 07-08-2006 09:07 AM
Ice.Application class in C# beardo Help Center 9 08-09-2005 01:08 AM
Application name nsns Help Center 0 07-20-2004 04:43 AM
Documentation:Writing a ice application with Java dipakyadav Bug Reports 1 02-24-2003 02:25 AM


All times are GMT -4. The time now is 11:10 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.