Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Jagge
Posts: 12
Registered: ‎08-06-2008
My Device: Not Specified
Accepted Solution

2 Application try to comunicate with BES

Hello, I'm trying to get the ECL Demo 2 times runable on my device. I copied the demo (one time for the Device and at the server too) and changed only the port.

There are now to ListenerThreads which hear both on the 8080 from the server an there are a second port at the Server and there is 1 database with 915 and 1 with 911. And at the Device si also 1 with 915 and 1 with 911.

 

With 2 ports i mean this. 

 

URL url = new URL("http","localhost",8080,"/push?DESTINATION=2100000F&PORT=915&REQUESTURI=/");

 

the destination is here only an example. 

 

and the Listener thread has this code.

 

(StreamConnectionNotifier)Connector.open(http://:915);

 

And than come other code to get the data. 

 

Now my Problem if i have only 1 application on program on the device then i get both pushes to this program. And if i have both programs on the device then i get both pushes at only 1 program. It is like the listener doesn't look to the second port he has to listen. 

 

Can anyone help me please?? 

 

MfG Jagge 

Please use plain text.
Administrator
MSohm
Posts: 14,281
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: 2 Application try to comunicate with BES

Have you also changed the persistent store IDs?  If not each application could be receiving its own push, but storing the data in the same location.  Meaning both applications are writing to and reading from the same persistent object, resulting in the same data showing up in both applications.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
Jagge
Posts: 12
Registered: ‎08-06-2008
My Device: Not Specified

Re: 2 Application try to comunicate with BES

Yes i changed the ID at the last number. 
Please use plain text.
Administrator
MSohm
Posts: 14,281
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: 2 Application try to comunicate with BES

I recommend connecting the BlackBerry to the BlackBerry JDE and select some break points in the two applications to walk through what is actually occuring.

 

To do so connect the BlackBerry via USB and in the BlackBerry JDE click on the Debug menu, select Attach to, Device and then select your PIN.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
Jagge
Posts: 12
Registered: ‎08-06-2008
My Device: Not Specified

Re: 2 Application try to comunicate with BES

I Solved the Problem!!!

It was because i copied the project in Notes. There was then 2 classes named DominoPusher. And i think if Notes uses a class it saves the class and if a other program uses the same classname then it uses the same class and not the class from the project.   

But thx for the other tips

 

MfG Jagge 

Please use plain text.