// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
int main(int argc,char **argv)
{
+ // initialize the ORB
+ CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
+ // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
try
{
CosNaming::NamingContext_var _rootContext, catalogContext;
- // initialize the ORB
-
- CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
-
// initialize POA
//
- long TIMESleep = 250000000;
+ long TIMESleep = 500000000;
int NumberOfTries = 40;
int a;
timespec ts_req;
for (int i = 1; i<=NumberOfTries; i++)
{
if (i!=1)
+#ifndef WNT
a=nanosleep(&ts_req,&ts_rem);
+#else
+ Sleep(TIMESleep/1000000);
+#endif
try
{
obj = orb->resolve_initial_references("RootPOA");
if(!CORBA::is_nil(orb))
theObj = orb->resolve_initial_references("NameService");
}
- catch( CORBA::COMM_FAILURE& )
+ catch( CORBA::SystemException& )
{
- INFOS( "Module Catalog Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
+ INFOS( "Module Catalog Server: CORBA::SystemException: Unable to contact the Naming Service" );
}
if (!CORBA::is_nil(theObj))
{
for(int j=1; j<=NumberOfTries; j++)
{
if (j!=1)
+#ifndef WNT
a=nanosleep(&ts_req, &ts_rem);
+#else
+ Sleep(TIMESleep/1000000);
+#endif
try{
object = inc->resolve(name);}
catch(CosNaming::NamingContext::NotFound)
INFOS("Caught CORBA::Exception.")
}
+ // delete myThreadTrace;
return 0;
}