Jane Somerfield

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

Recent posts by Jane Somerfield

It seems that webMethods provides two JMS engines : Universal Messaging (from Terracotta) and Nirvana (from myChannels).
What's the difference ? Which one is better?

Also webMethods has its own Integration Server or Message Broker. Not sure what message engine they use.

All comments are welcome.
I did a simple experiment:

While CNN Money showing the changing market data, I disconnected the network connection from my computer.
The last data remains on the page (values, timestamp, ...) without any changes during the period of disconnection.
The disconnection time is about a hour. Then I connected the computer to the internet, and saw the updates resumed in about 5 minutes after the connection.

I do not think CNN Money server keeps the connection information (or client session) after the connection are gone for over a hour. So server pushing in this
situation is impossible.
You can see the market change in every 2 seconds on money.cnn.com. It looks like the client pulls the data from the server. Is this correct?
Sorry, the code does not compile. My question was can we use primitive in generics.
12 years ago
The answer is No. But I can do this

List<int> l = new List<int>();

Why?
12 years ago
Try Flex. It is the best at this moment.
14 years ago

Jeanne Boyarsky wrote:
Here's some code that's pretty much how you do it. (I typed this without a compiler so it might not be 100%. Google "reflection invoke method" for a full example. I was trying to focus on the steps/pseduocode.)


This isn't something you want to do for the purpose of inheritance though. For a basic construct like that, it's better to use what the language supports - interfaces. That way when people read the code, it uses the standard Java idioms.

Reflection does have a use - when you are writing utilities or don't have the ability to force interfaces on the objects they deal with.



It is not polymorphism. Your containing class consists of a class of clazz. So the behave of clazz is part of the containing class.

Kengkaj Sathianpantarit wrote:In Java we can implement polymorphism by using interface or inheritance.
So an answer of this question is using interface.

Or you mean you don't want to use both interface and inheritance?



Java is a language supports multiple inheritance through Interfaces, not Classes.

Ilja Preuss wrote:The only way to do it in Java is to use reflection. And that's clumsy.



How?
C++ allows generic points, which make it possible that Class A behaves as Class B at runtime even Class A and B do not have a common base Class.
Python is weak typed script language. It can support "Polymorphism without inheritance".

Java is a strong typed language. It is impossible to do "Polymorphism without inheritance".
Some script languages support it. How to do it in Java?
Is this good for Java? What if Oracle does something that IBM does not like?
What about open sources? Larry doesn't like competition with cheaps.

Check out this: http://money.cnn.com/2009/04/20/technology/sun_oracle_ibm/index.htm?postversion=2009042013
14 years ago