Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

rushikesh kale

Ranch Hand
+ Follow
since Jan 25, 2005
rushikesh likes ...
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 rushikesh kale

Hi Freinds,

I want to remove duplicate element from my List.
I have following List:

which contains follwoing elements {2,4,5,6,3,5,2,3}

Now i want to remove common elements such as {2,3}
can you please tell me how can i do that
14 years ago
Hi Friends,

I created 2 ArrayList as follows:

Now i want modify List A1 such that, it will contain only element which are not present in List B1.

How can I do this?
14 years ago
Here is my Design detail of the Program:
I created the class SensorNode which is use to create sensor object.
It contains properties like name, id, x coordinate, y coordinate, transmission range etc. I am populating them using getter and setter methods.
In my main class, I am taking following inputs:
1. Number of sensor to be deployed
2. Area of the Network (eg. 1000X1000)
3. Range of the sensor
4. Then, I am generating x and y coordinates randomly in a for loop and storing them in new objects of class SensorNode
5. I am also populating other properties of sensors(name, id, range) inside this for loop.
6. After generating these sensor object, i am storing them in a List.
7. By this, I am deploying the sensors randomly in a particular area.
8. Then, I am trying to find neighbours of each sensor i.e sensors which are placed within the range. and storing them, in Neighbouring array.
9. Now, I am trying to form a network, by implementing routing protocol to connect different neighbours.
10. Then, I wrote a function which simulate the message passing mechanism of a network
11. Now, The thing which is remaining is to provide a dummy timestamp for which i need assistance?
14 years ago
Thanks For reply Campbell,

But I dont want real timestamp. I want to simulate the real world network so require dummy timestamp. I also require epoch (Some Time Interval) to show the event duration of particular operation like,time taken to send packets, Idle time of a particular sensor node. etc.

Anyway,I still need helps regarding this!
14 years ago
Hi Friends,

I am doing sensor network simulation project. In which I have some functions which deals with Timestamp (like getTimeStamp, becomeIdle, setEpoch).
well I almost simulated whole network part i.e. Random Deployment of sensor nodes, Find the node within the sensing range (neighbours). Establish a routing path, sending packets etc.
Well, Now I require to provide a timestamp for each event of sensor node like send packet, receive packet, sleep, wakeup and I don't have any clue, how can i implement it.

After all the Google searching,finally I decided to tell my problem to javaranch. because this my last resource.

Please give me some hint or logic to deploy timestamps.
14 years ago

I am trying to create webservice method which will return particular (Employee) object as a response.
I wrote following method to implement that :

I deployed this web service on a Glassfish server (in netbean6.0.1) successfully.

But when i try to call this method via web service client, I am not able to
give a argument to above function.
My Client calling code is as follows:

where argEmpIfo is of type List<org.beans.Employee> which is present at different web service.
Even though both Employee Classes have same strucure, I am getting incompatible type error.

So, Is there any other logic to return Object from a web service operation?

Please reply to this post, I am very new to web service development and I desperately looking for right direction to create a web servicce for my Company.
14 years ago
Hi Friends,

I am trying deploy my web service using EJB entity beans, session beans and message handlr beans.
I followed Begining With Enterprize Application tutorial to develop my web service.
I ran this tutorial successfully, but I was failed to implement this tutorial in my web service for following reasons:

1] This tutorial used only 1 database table to create entity class and I want to create entity classes for 2 database tables.

2] Was unclear about how to add my custom business logic in session bean.

3] Whether i should use single Message-Driven Bean for different DB table or separate?

4] not clear about following code in Message-Driven Bean:

5]I got following galssfish v2 server error log while running my ejb application:

Please let me help to clear these doubts
14 years ago
Hi Friends,

I have some basic questions regarding web service, since this is the first time i am creating Axis2 web service.
My question is:
1. How to run commands like WSDL2JAVA, JAVA2WSDL.
For Example

I am getting class not found error.
14 years ago
Hi Friends,

I wrote a program for online banking and I used mvc model 2 approach for that,I have refresh problem while doing withdrawal and deposit:

First let me explain how this transaction of withdrawal takes place:

In my JSP page user enters amount to be withdrawn -> control gets transfered to transactionController servlet -> Controller servlet create object of transaction javabean and calls method withdraw of using that object.
After successful withdrawal servlet store the new account information in session and again transfer control back to same jsp page with new account balance -> jsp page displays new account balance.

Now problem is, If I refresh this Account balance jsp page, previous transaction takes place again and amount gets withdrawn again.

Can you please tell me, what is wrong in my logic, and what should i do to avoid this re transaction.

Here is Code Snippet from my transaction controller servlet:

waiting for response
14 years ago
It works!
I was trying this from past few hrs ,
I admit that,since i am very new to jsp and particularly MVC approch, i skipped some convention.

But your tutorials gave me proper way to implement mvc approch and also saved lot of time.

Thanks once again for all!
14 years ago
Thanks ben and vassili for reply!

I know that, how to use this JSTL tag, In my project use of JSTL custom tag is not allowed.

I developed my code, by following concept of simpleMVC and simpleTable code from bens Simple Servlet Example ,
But in my project use of custom tag is not allowed.

So is there any other logic to get the object values in jsp page, which are set in servlet page.
14 years ago
Hi Friends,

I am not able to get values of a bean object on my jsp page which are set in servlet.(Trying to use MVC approch first time )

In my servlet code I am setting attributes of my bean object as follows:
my servlet code:

Well, In my jsp page I can get that value using following tag:

This is working fine, But I want to use this no_of_acct attribute in a if loop, How can i do that?

I tried this code :

but getting error while doing this.

Can anybody tell me the proper way of getting this bean object value for above code
14 years ago
Hi Friends!

I want to write program which will calculate value of X,Y,Z by solving following 3 polynomial equation:

(x-4)^2+ (y-0)^2 = (45 + 5Z))^2 ------Equ 1
(x-7)^2+ (y-2)^2 = (23 + 6Z))^2 ------Equ 2
(x-0)^2+ (y-3)^2 = (89 + 4Z))^2 ------Equ 3

Sorry for not submitting any tried code; since i have know clue what is the logic for this problem.

Please give me some suggestion to form some logic to write a java program for this!

Thanks in advance
14 years ago
Hi Friends!
I am writing a program to implement a console based calculator which will perform some basic arithmatic operation.
It will provide two mode i.e. Decimal mode and hexadecimal mode.
Since my project require polymorphism, i have to use same function name for both Decimal as well as hexadecimal.
I wrote a code for decimal calculator. but cant find solution how to implement these same function for hexadecimal.

here is my function list for decimal calculator:

I want to used these same function names for hexadecimal arithmatic calculations.
Please provide some help regarding this!

Thanks In Advanced
14 years ago
Hi Friends!
I Want to Create PopUp Window of web page ,Which will open Automatically as soon as the My web page Gets Loaded.Please tell me the exact command to do this.

Thanks In Advance!