Cisco Unified Application Environment Developer Forums

« Back to Developers

registering application

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hi,

After successful connecting I call registerApplication method and it blocks there.
I do the method call with valid credentials and partition parameter "Default". I've traced the method call down - it blocks somewhere after calling of _end_registerApplication method of RemoteEtchBridgeServer class.
What could be the problem?

Thank you,
Vadim.

Hi Vadim,

Hope you are trying to register your application after the server
startAndWaitUp. Do you mind sharing your Main function code over here ?

A working sample would be something like this:

public static void main( String[] args ) throws Exception
{
// TODO Change to correct URI
String uri = "tcp://10.89.31.153:9000";

RemoteInAndOut_JavaServer server =
InAndOut_JavaHelper.newServer( uri, null,
new MainInAndOut_JavaClient() );

// Connect to the service
server._startAndWaitUp( 4000 );

// TODO Insert Your Code Here
String key = server.registerApplication("InAndOut_Java",
"Default", "Administrator", "metreos");
System.out.println("Application Successfully registered
with key:"+key);
System.out.println("Press Any key to exit from the
application");
System.in.read();
// Disconnect from the service
server._stopAndWaitDown( 4000 );
}

regards,
Ram

Cisco Developer Services
http://developer.cisco.com/

-----Original Message-----
From: cuae-developers-bounces@developer.cisco.com
mailto:cuae-developers-bounces@developer.cisco.com On Behalf Of Vadim
Bruk
Sent: Wednesday, June 18, 2008 5:44 PM
To: cuae-developers@developer.cisco.com
Subject: [Cuae-developers] registering application

Hi,

After successful connecting I call registerApplication method and it
blocks there.
I do the method call with valid credentials and partition parameter
"Default". I've traced the method call down - it blocks somewhere after
calling of _end_registerApplication method of RemoteEtchBridgeServer
class.
What could be the problem?

Thank you,
Vadim.
_______________________________________________
Cuae-developers mailing list
Cuae-developers@developer.cisco.com

_______________________________________________
Cuae-developers mailing list
Cuae-developers@developer.cisco.com

Here is my main method:
public static void main( String[] args ) throws Exception
{
// TODO Change to correct URI
RemotejtapitestServer server = null;
String uri = "tcp://10.11.3.23:9000";// + String.valueOf(i);
System.out.println("Connecting to: " + uri);
server = jtapitestHelper.newServer( uri, null,
new MainjtapitestClient() );

// Connect to the service
server._startAndWaitUp( 4000 );

String regRes = server.registerApplication("jtapiTest", "Default", "administrator", "Password?");

// Disconnect from the service
server._stopAndWaitDown( 4000 );
}

Please note that it never returns from registerApplication method.

Hi Vadim,

It looks like after registration your app terminated as well... since
you called the server stop command...

Could you add these before server._stop...

System.out.println("Application Successfully registered
with key:"+ regRes);
System.out.println("Press Any key to exit from the
application");
System.in.read();
// Disconnect from the service

Let me know how this goes.

regards,
Ram

Cisco Developer Services
http://developer.cisco.com/

-----Original Message-----
From: cuae-developers-bounces@developer.cisco.com
mailto:cuae-developers-bounces@developer.cisco.com On Behalf Of Vadim
Bruk
Sent: Thursday, June 19, 2008 10:54 AM
To: cuae-developers@developer.cisco.com
Subject: Re: [Cuae-developers] registering application

Here is my main method:
public static void main( String[] args ) throws Exception
{
// TODO Change to correct URI
RemotejtapitestServer server = null;
String uri = "tcp://10.11.3.23:9000";// + String.valueOf(i);
System.out.println("Connecting to: " + uri);
server = jtapitestHelper.newServer( uri, null,
new MainjtapitestClient() );

// Connect to the service
server._startAndWaitUp( 4000 );

String regRes = server.registerApplication("jtapiTest",
"Default", "administrator", "Password?");

// Disconnect from the service
server._stopAndWaitDown( 4000 );
}

Please note that it never returns from registerApplication method.
_______________________________________________
Cuae-developers mailing list
Cuae-developers@developer.cisco.com

_______________________________________________
Cuae-developers mailing list
Cuae-developers@developer.cisco.com

I've added the lines with the same result - it never returns from registerApplication method. Calling stack in my debugger shows that it's sitting in java.lang.Object.wait()<-etch.util.CircularQueue.get()<-etch.bindings.java.transport.PlainMailbox.read().