Christian Hauser

Greenhorn
+ Follow
since Feb 17, 2003
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 Christian Hauser

Originally posted by Christian Hauser:

My question is now if void is such an RMI-IIOP compliant return type. Is it?



What about arrays? Should be fine in my opinion, but where can I get a list of what exactly RMI-IIOP compliant means?

Thanks,
Christian
Hello all
The EJB 2.0 Spec states that a business home method in the remote home interface of an entity bean must have an RMI-IIOP compliant return type.

My question is now if [B][/B] is such an RMI-IIOP compliant return type. Is it?

Thanks in advance for your help.
Christian
I identified the problem. I had the j2ee.jar in JAVA_HOMEC/jre/lib/ext. I removed it there and now it works.

I'm sorry for this post. Next time I'll boot my brain before posting a mesage.

Christian
Hello

I've finally begun reading "Head First EJB". In the first chapter there is a tutorial to build a simple enterprise bean. I understand the code, however, I cannot start SUN's RI Server (J2EE 1.3.1).

If I enter 'j2ee -verbose' at the command prompt I get several exceptions:


I'd be very glad if someone could give me a hint on what I might be missing. I have set J2EE_HOME and added J2EE_HOME/bin to the path.

Thanks in advance,
Christian
Hi Marty and others
I had a problem some time ago and wonder if that could now be implemented better using Servlets 2.4 and JSP 2.0. I needed a session counter that kept track of the active sessions, so that I roughly knew how many users were online.
I implemented a SessionCounter class that implemented HttpSessionListener. On sessionCreated() I incremented a static variable and on sessionDestroyed I decremented the static variable (setting it to 0 when it got negative).
The problem there was the fact that this web server rebooted very often (at least twice a day). After every reboot I lost my static variable (it was reset to 0). However, the sessions had been restored by Tomcat but (of course) I got no sessionCreated() events for those restored sessions... So for at least 2-3 hours (due to a high session timeout) I got a too low count of active users.
Now I would like to know if there is a more reliable solution to this problem using the new Servlet Spec 2.4 or if there are new event listeners.
Thank you for any hint.
Regards,
Christian
[ November 12, 2003: Message edited by: Christian Hauser ]
20 years ago
Hi Marty and others
I had a problem some time ago and wonder if that could now be implemented better using Servlets 2.4 and JSP 2.0. I needed a session counter that kept track of the active sessions, so that I roughly knew how many users were online.
I implemented a SessionCounter class that implemented HttpSessionListener. On sessionCreated() I incremented a static variable and on sessionDestroyed I decremented the static variable (setting it to 0 when it got negative).
The problem there was the fact that this web server rebooted very often (at least twice a day). After every reboot I lost my static variable (it was reset to 0). However, the sessions had been restored by Tomcat but (of course) I got no sessionCreated() events for those restored sessions... So for at least 2-3 hours (high session timeout)
Now I would like to know if there is a more reliable solution to this problem using the new Servlet Spec 2.4 or if there are new event listeners.
Thank you for any hint.
Regards,
Christian
20 years ago
Hello Eclipse contributors
I'm quite new to writing Eclipse plugins thus my question might be quite ridiculous.
When writing a plugin for Eclipse should I also use internal and external packages?
For example, should I use packages in the form com.mycompany.myplugin.internal.whatever? Or only if I provide extension points to my plugin for other developers to enhance my plugin?
Thanks for clarifying this.
Christian
Thank you Mike.
In fact, I was just about to start updating this thread when I read your post.
Christian
20 years ago
Thank you Steve for pointing me to your JAMon API. I'll have a look at it.
However, I still do not understand WHY it is possible that I get a negative session count. Why should there be more sessionDestroyed() calls than sessionCreated() (overall)?
Christian (still confused).
20 years ago
Okey, but why is it that I get negative numbers? Is this a problem of my ServletEngine or does it have to be this way?
Christian (a little confused about HttpSessionEvents)
20 years ago
Hello
I wrote a JSP and a Servlet some time ago that both count the active sessions of a web application and display them.
To do that I wrote a class SessionCounter which implements HttpSessionListener and thus is being informed when a new session is created or a session has been destroyed.
Unfortunately there seems to be a problem with my program, because the web application says that there are currently -16 active sessions.
Maybe there is a problem within my code or some resources within the servlet engine (ServletExec 4.1) are not reset when restarted.
I hope someone can give me a hint.
Thank you in advance,
Christian
Code of JSP (similar in Servlets in other web applications):

Here's the class SessionCounter, which belongs to a utility JAR that is situated in the lib directory of each web application.
20 years ago
I've tested it and it worked with the following code. Try using my UpperCaseTextField insted of a normal JTextField and it works:

Good luck,
Hausi
20 years ago
I would try something like this:

I know I've seen something like this before, but I don't remember where.
HTH,
Hausi
20 years ago