Simeon Cherniy

Greenhorn
+ Follow
since Jul 26, 2006
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 Simeon Cherniy

Hello.
I've the following problem and I can't understand it.

The static method of my class (A) was called from the business method of the session bean (CMT).

Firstly, my class was like:



In the session bean I call the method of this class:

A.getInstance().methodName();

Here I had the NoClassDefFoundError (from log-file).

After I had replased the code:



It works fine.

But I don't understand the reason of the first error.
16 years ago
What does happen with the EJBObject on the server side and its stub on the client side?
Are they removed or not?
Hi all!
There is a question:

In the book "SCBCD Exam Study Kit" the author Paul Sanghera writes:

Can client use EJB
object reference after
calling a successful
remove()?

the answer is:

Stateless Session Bean: No. If used, it will receive
an exception.

I tried to call remove method on the var, that reffers to the EJBObject of the session bean instance, and after call business - method. I didn't catch any exception. I carried out this experiment with Bea WebLogic 8 server and JBoss server.

In the EJB 2.0 spec I hasn't found any information.

Could you clear my mind?

Thanks!
[ June 04, 2007: Message edited by: Simeon Cherniy ]
Hello!

I have a question.
I have the class
public class Test implements Serializable
{
public TestTwoClass classTwo = new TestTwoClass();
public int i;
...
}

After serialization and deserialization will the variable 'classTwo' reffer to the object TestTwoClass?

Are there any requirements to the TestTwoClass?

If TestTwoClass is not serializable, what value will the variable 'classTwo' has?

Thanks!

[ June 04, 2007: Message edited by: Simeon Cherniy ]
[ June 04, 2007: Message edited by: Simeon Cherniy ]
16 years ago
Hi all!

Autocomplete means the panel in which we could select the word to end the current word.

I have a problem in implementation of autocomplete function (like in Eclipse or IntelliJIdea)

I have:
1. Applet
2. JPanel
3. JEditorPane
4. JScrollPane for JEditorPane

Applet contains Jpanel, Jpanel contains JScrollPane.

I have a listener and I can to cath event of keyReleased(for ex. DOT) in JEditorPane.

How to realize the panel, which contains the set of words to complete the current one?




What should be after second comment?

Thanks!
17 years ago
I have resolved this problem.
The problem was, that constructor (by default) of inner class required an instance of outer one
May be I wrote not clear:

I have:
1. Outer out = new Outer();
2. String str = "Inner";
3. Outer.Inner in = null;

I want:
in = an instance of inner class.

Suppose you don't know about is there inner-class with name "Inner" or not. And you can't write new Outer().new Inner()

Thanks!
Hi, all!

There is a question.
I have the classes:



I want to create the instance of Inner class using name of inner-class ("Inner") and the instance of Outer.
Like this:

Object obj = Class.forName("Outer$Inner"); - this code is valid only if Inner class is static. But it is not static in my case.

Thanks all
SCJP1.4 passed with 83%.
It's not very good result but it opens the gateway to prepare and pass next more interesting and more complicated exam.
Neares aim is SCBCD :-)
Greetings from Moscow!
17 years ago
Hi, all!
Could you advise me which of mock exams (from Mock Exam List) are more complicated and which the nearest to the real exam.

I have passed Marcus Green's Mock Exam (1 and 2) and my results are about 83%.

Thanks
Hi all!

I have ordered the voucher for test.
1. How long will Sun proceed this order?
2. What term of validity does voucher have?

Thanks
Hi all!

I have ordered the voucher for test.
1. How long will Sun proceed this order?
2. What term of validity does voucher have?

Thanks
Hallo! :-)
I have a question:
Example code:


I read that the object of inner class has "reference" to the object of top level class.

1. What kind of "reference" is it?
2. What does happen after calling System.gc() in code above?
3. Is object of class Test removed from the heap?

Thank you.

P.S. If there are any errors in the code, takes it easy, not as mistake :-)

[ September 17, 2006: Message edited by: Simeon Cherniy ]
[ September 17, 2006: Message edited by: Simeon Cherniy ]
Of cource, we can't be sure of completion of finally block . But the finally block will be executing until it is not finished. If finally block throw exception than on the top of stack trace we will have this exception