Mario Razec

Greenhorn
+ Follow
since Aug 01, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mario Razec

Hi buddy,

I installed on my home.

What Operating System do you work?

I think you need to configure your hosts.

Did you try setting hosts?

Linux
vi /etc/hosts

If your IP address is assigned to you by a DHCP server, then /etc/hosts is configured as follows:

127.0.0.1 myhome.mydomain.com localhost.localdomain localhost myhome

If you have a static IP address, then /etc/hosts is configured as follows:

127.0.0.1 localhost.localdomain localhost
192.168.0.10 myhome.mydomain.com myhome

Windows
Add your ipaddress and fully qualified hostname, then save the file:
C:\WINDOWS\system32\drivers\etc\hosts

Test with: ping hostname.myhome.com

See you..
15 years ago
Hi Raj,

Henry said true, in Java isn't a BAG implementation.
But Bag is a collection of disorder that allows duplicate elements and Hibernate provides a mechanism for a List in Java to simulate the behavior of a Bag.

Hibernate Bag:
https://www.hibernate.org/hib_docs/v3/api/org/hibernate/mapping/Bag.html

Difference between List is:

"An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list."- http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html

Hope this help you

15 years ago
Hi Ivan,

That is exactly what I thought. But I needed this answer.

you help me a lot.

Thanks so much...
15 years ago
hi buddies,

I've built the web service/SOAP and worked. But I'm consuming separately.

How can I send message through Web Services/SOAP between Desktop APP and Web APP?

[DesktopApp] ----> Send the message --->[WebAPP] ---> Show the message

Desktop App

public class Main {
public static void main(String[] args) throws Exception {


String local = "http://localhost:8080/Buble/services/Message?wsdl";

Call call = (Call) new Service().createCall();

call.setTargetEndpointAddress(local);

call.setOperationName("sayHello");

Object[] param = new Object[] { new String("Baby")};
String ret = (String) call.invoke(param);

System.out.println("Name: " + ret);
}
}


Web App - index.jsp

<body>
<%
MessageService service = new MessageServiceLocator();
Message msg = (Message) service.getMessage();
out.println("Nome: " + msg.sayHello("Razec"));
%>
</body>

thanks in advance
15 years ago
Vijayagopalan thanks for the book.

I'm reading SOA in Practice The Art of Distributed System Design, O'Reilly: Nicolai M. Josuttis.

Congratulations Vijayagopalan
Hi,
These Anonymous Inner Class can accesss instance is made in the same place.

Example...


Look:
http://mindprod.com/jgloss/anonymousclasses.html
http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html

And checking reply Paul Somnath ...

See you...
Hi..
First Post ..Welcome

While: you use for executes a block of statements while a particular condition is true...

Checking: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/while.html

But to help you paste the code complete.

see you
hi,
exactly...
A static final variable is effectively a constant.
Remember Java constants are normally declare ALL CAPS and separated by underscores.
Example:
public static final int MAX_VALUE = 25;

checking more details:
http://www.javaworld.com/javaworld/javaqa/2003-03/02-qa-0328-constant.html

Cya

---
Razec
[ August 28, 2008: Message edited by: Mario Razec ]
hi,

"Synchronization

Threads communicate primarily by sharing access to fields and the objects reference fields refer to. This form of communication is extremely efficient, but makes two kinds of errors possible: thread interference and memory consistency errors. The tool needed to prevent these errors is synchronization. "

Checking: http://java.sun.com/docs/books/tutorial/essential/concurrency/sync.html

see ya
hi...
I understand that:

equals() using to comparison, refers to equivalence relations.
hashCode() is id number allocated to an object by JVM.
Contract: When you use equals() and hashCode() methods is necessary to override these methods

But checking please:
https://coderanch.com/t/269570/java-programmer-SCJP/certification/Let-discuss-hashcode-contract

http://www.javaworld.com/community/?q=node/1006
http://java.sun.com/developer/Books/effectivejava/Chapter3.pdf
Detail:
Object needs to be serializable (writing the state of an object)

So When use modifier Transient you not will get serializable your object...
it won't be transmitted in the byte stream to wherever the object is destined.
Means we cannot change the value and this variable can not be stored in a memory.

Checking Example of our friend: amit k prabhat..

see ya
Hi SekBar prefix and postfix is strange =)
Ankit excellent explanation...

Remember: The book (K&B)pg:289: "The operator is placed either before (prefix) or after (postfix) a variable to change its value."

I advise the Debug Code for greater understanding.
Look: http://www.janeg.ca/scjp/oper/prefix.html
hi babul,

Checking for each: http://www.leepoint.net/notes-java/flow/loops/foreach.html

Prog2
Remember Array: "Each item in an array is called an element, and each element is accessed by its numerical index"

this Line: System.out.println(arr2[4]);
you accessed 4 element of array:

Index : 0 1 2 3 4
Element: {1, 2, 3, 4, 5}

So output: 5

Details checking: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html

Cya brother..
I hope that helps!
[ August 06, 2008: Message edited by: Razec ]