sanjay ramaswamy

+ Follow
since Feb 11, 2009
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sanjay ramaswamy

Soumya Rout wrote:Ok do one thing. Open your JAD file
It should be like

To add these properties in netbeans follow the steps,

1. Go to project Properties. (Right click properties)
2. Find the Application Descriptor section from the category
3. You will get the 4 tabs. Chose the respective tab and add the respective properties.

Then build the project. And reopen the JAD. After doing these things try to run your SMS app. It should work now.

Great!!! The jad file has now the same info as you mentioned but i am not able to create two instances of the same application .

my application has code to receive sms which is running in one thread throughout the application and one more thread to send sms .

so the problem is "Nokia Connectivity Framework could not get a phone number. SMS between SDK's will not be available. Terminate all SDKs.Then stop NCF(Nokia Connectivity Framework) using system tray and restart NCF using start menu "

I want one instance to send a message and one to receive ???
13 years ago

Soumya Rout wrote:Have configured the PUSH Registry properties in the JAD ?

e.g:- MIDlet-Push-1: sms://:50001,RecieveMidletName,*

Not sure how to do it in netbeans for my application .

13 years ago

Yasin Turk wrote:I made a MIDlet for SMS listening. It works on Emulator WTK. I tried it on my phone Nokia 2630 (s40 5th edition). But it throws an exception. It says: "Cannot receive in client mode"

So does this mean that I need to change this into "Server Mode"? Is it possible?

Thanks a lot.

How do you send a message to your midlet that is listening ???

will i be able to send a message from one application that is running in WTK 2.5.2 to another application that is listening and running in netbeans using nokia sdk 6th edition ???

Please answer both questions ASAP . Thanks
13 years ago
I am using netbeans and nokia s40 6th edition sdk . while this app is running in netbeans, i open wma console in wireless toolkit utility and send a message from it on port 50000 with the emulator's phone number but unfortunately it does not receive messages .

13 years ago

Vijay Dogra wrote:Hi Sanjay,

Can you please try to set the settings of installed application on your phone (Options->Application Access).

If this even doesnt help, then you have to sign your application before installing it to the real device.


I could not find that i.e Options-> Application access .

I think in USA the carriers like AT&T that i am using gives us locked phones (I am guessing!!!) which is why we can install our apps but not be able to use wireless api's .

I want to simulate over an emulator now instead of in a i have a different problem and will start a new thread !!! Thanks to vijay
13 years ago

Vijay Dogra wrote:Have you mentioned the permissions required in your file?

This is my file inside my jar file that i try to install in my nokia phone which is on a US carrier .

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.1
Created-By: 1.6.0_23-b04 (Sun Microsystems Inc.)
MIDlet-1: How To SendTextSMSMidlet, , HowToSendTextSMSMidlet
MIDlet-Permissions: javax.wireless.messaging.sms.send, javax.wireless.
MIDlet-Vendor: Vendor
MIDlet-Name: How To SendTextSMSMidlet
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0

I have just added the extra receive permission although it is not needed in this case . when i test the code in an nokia s40 emulator, i get result = true (Please interpret this meaning from the code ) . I then install the jar in my phone(E71) and it shows the form . I enter the phone number and a message and press send and the result is false which means the message is not getting sent !!! it seems to me an issue of app-signing or a case of handsets here in US which are locked or deny me access to basic sms sending features of j2me apps.
13 years ago

I am not able to get rid of the security exception when i test it in the nokia E71x phone i.e i get result is false. I tested my below code in netbeans with Nokia S40 6th edition sdk and it works fine meaning i get the value of result as true when a message is sent .

when the send button is clicked a new thread is started in the commandAction method and in the run method sendSms is called which returns true if message is sent or false from the catch block . Please help me understand what is the problem here ???

13 years ago
Hi Folks,

I have an https:// link to a resource of my server and a third party vendor that we use is trying to do an HTTP POST of an xml to my resource i.e my url and when we test our url it works fine and the below error is being generated at their end .

what is the meaning of the problem that is generated at their end and who should fix this issue . I do realize that it is to do with my server certificate that needs to be imported by them in their keystore because i am able to access my url outside my network and it works fine . so what is the problem . PKIX path buildingfailed: unable to find valid certificationpath to requested target .

Please help me understand .

Jim Hoglund wrote:Okay, EACH_THREAD is a limit on how many cells will be calculated by one thread.
I just plugged in a number that will cause a few threads to die early, before the table
is completely filled in. This assures that multiple threads will run, demonstrating what
you want to see.

Did you run the program? It has two output grids. One is the calculated grid and the
other shows the thread number that calculated each cell. I would be happy to address
any other questions you have.

Jim ... ...

I did run the program for an array of size 1000 and in that case as per your design the threads die and only one thread is performing most of the calculations so but i correct previously what i said that your code output gives the same calculated result for different number of threads of the same size . it gave different result .

One of the things that i felt was Java is not very convenient in terms of problems which requires concurrency certainly i didnt find threads easy to implement in such situations . do you have any good articles that you have used before or any book you would like to suggest .

really appreciate your time . thank you!!!

Jim Hoglund wrote:Thank you for the quick response. I will have some
time to work on your questions tomorrow.

Jim ... ...

Hi Jim,

Just need to understand the logic behind the EACH_THREAD variable . if you could explain to me that it would help .


Jim Hoglund wrote:Sanjay : This is not a debate. We are trying to help you see problems with your design.
Please study my previous response. It explains why there would be inconsistent results,
as Peter identified in his post, and shows one way to avoid this problem. Please do not
make us feel that we are wasting our time in trying to help.

Jim ... ...

Jim i totally appreciate your efforts as well as Peter's and i am executing your design as well as his but i have a doubt and so wanted to clarify . I am in now way willing to let you guys think that you are wasting your time .

my concepts are not yet very clear with regards to multithreading and letting each thread access the monitor through a mutex lock , if you could show me links related to any good article it would be very useful .

My current doubt is still the same jim and i am studying your code and i have a doubt i.e what is the logic behind the EACH_THREAD variable so i am not clear with that in your code , could you kindly help me understand please . what is its relation with THREADS variable

Apparently Jim, in your design . I get the final result displayed same for any number of threads that you use i.e 1,2,4,8 but that was not the case with Peter's so which is why i want to clarify with him . Thanks again to Jim and Peter (my doubt still remains!!!)

Peter Taucher wrote:
First of all you never executed the threads concurrently ... only one at a time was running. I'm sure that's not what you wanted. With the modifications at least different threads concurrently modify the jacobi array. I don't really know what you're trying to achieve. In each thread you go through the loops and for each thread count therefore get another result.

Yeah i think in my program only one at a time was running . what i wanted was , i want the threads that got created each to get into the monitor i.e the array and perform the computations and leave while the other thread would enter in and perform the computation and so on untill all the rows in the array got computed .

I disagree with you about getting different results . only one thread is entering and performing the computation on a row or two or more and then it comes out of the loop while the other thread enters the array . so the value computed should be the same . I have a confusion about this .

Peter Taucher wrote:
The threads may concurrently modify entries of the array that other threads may use as operands for their next calculatione therefore I don't think you'll get a defined result that easily.

only one thread is performing the math on the array for that one row or a number of rows . math computed by any thread will always be the same .

I am not getting the same answer displayed when i perform the computation with different number of threads i.e 2,4,8 . my objective is for each thread when started i.e for in the run method,each thread has to stay in the for loop for some iterations and then come out of it so that other thread could get in and perform .

The project consists of implementing a multi‐threaded version of the Jacobi algorithm to
calculate La Place’s Equation. The Algorithm traverses a 2D NxN array, making every
element the average of its 4 surrounding neighbors (left, right, top, down).
The NxN array has initially all zeros and is surrounded by a margin with all 1’s as shown in
the example below. The 1’s never change, and the 0’s increase little by little.
1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 1
1 0 0 0 0 0 0 1
1 0 0 0 0 0 0 1
1 0 0 0 0 0 0 1
1 0 0 0 0 0 0 1
1 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1
Hi ,
you guys gave some awesome suggestions , so thank you first . but i have a multithreading problem in it and that is when i am spawning new threads only one thread is going into the monitor and finishing the work (in case of 2 threads ) but when you have more than 4 or 8 threads then 1 or 2 threads among them never do the job . the answer that is generated should be the same for any number of threads that i use but i am getting different answer each time when different number of threads that i use . where am i doing it wrong ???

14 years ago
Awesome were spot on !!! I am testing the code and will post the update tommorow for all to see . thank you so much
14 years ago