How can I see the http-session count for my JBoss AS 7.1 instance.
I can't find anything on the JBoss Application Server 7.1 Management Console.
Last time I used JBoss AS was version 4.3.
Thanks.
If you are talking about a specific application then you can use 'HttpSessionListener' or using 'HttpSessionBindingListener' http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionBindingListener.html
This would look at the sessions from inside the servlet container.
On the other hand the container should be able to count them as well. Old JBosses were able to disclose the information on a JMX bean
jboss.web:host=localhost,path=/<context-name>,type=Manager
with an attribute named 'activeSessions'.
On recent JBosses, the value is available in a different location, which is best explained here:
https://developer.jboss.org/thread/219739?_sscc=t
Related
I am a little new to J2EE. I have a EJB3 project and I want to run a class on application start-up, how can I do that?
I know in EJB3.1 I can use #startup and #singleton unfortunately that is not a option and I have to use EJb3 and java 5. I have done some research and there were a few solutions but I have been unable to make it work.
WebSphere Application Server version 6.1 does not support EJB3 with a standard installation. You also need to have a feature pack for EJB 3.0 installed.
See this information on the IBM site.
If this is not your issue you should update your question with more detail of what goes wrong.
Your only options prior to WebSphere 8 (with EJB 3.1 support) are:
WebSphere startup beans. These are a programming model extension
Package a WAR with the application, and use a ServletContextListener to initialize state used by the EJBs.
While it's well known that Websphere's JAX-WS implementation is based on Axis2, I have had trouble finding information how to set "scope" for the service.
In axis 2 scope can be defined using services.xml. Is this file also available in Websphere?
http://axis.apache.org/axis2/java/core/docs/axis2config.html
scope: (Optional Attribute) The time period during which runtime information of the deployed services will be available. Scope is of several types- "application", "soapsession", "transportsession", "request". The default value (if you don't enter any value) will be "request"
It seems it is possible to do what you want in WebSphere (not using services.xml):
Configuring the scope of a Web service port using wsadmin scripting
Did not try it myself, also, could not find such settings in the admin console or deployment descriptor of some kind but that might be possible as well.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to EJB 3.1 Deployment in Tomcat 5.5.x
Blockquote
Any buddy please help me i have an web space with apache tomcat 5.0 jsp 2.0 and jvm 1.6
and i want to use ejb in my project so please tell me what should i do that i can use ejb 3.1 in my web space which have these resources listed below
i) Tomcat - 5.5.xSupport
ii)JDK - 1.6.x Support
iii)JSP/servlet - 2.0 Support
so how can i use EJB with web application with this available resources i mean what should i do to these things
Please Help me...!!!
It's not possible, go download JBoss AS or GlassFish.
Tomcat implements just the web container part of Java EE
It's definitely possible and in some cases I prefer the option of using a lightweight container instead of a more heavy weight application server. Having said this though the version of Tomcat your using is too old and won't work anyway without some serious messing about with the container (changing some JARs that come preinstalled with Tomcat), even with that I'm not sure it will work.
As Bozho says, try OpnEJB, but go for JBoss or Glassfish if you can. Tomcat is a JSP container and therefore not meant to this kind of use. EJB run on Application servers.
We're using Jboss, but we are really only using its JMS stuff. So, is there a way that I can trim down what's loaded when Jboss starts?
You can go for a servlet container (Tomcat) + a JMS provider (ex. ActiveMQ), without using an application server at all.
From 6 years ago, here's a blog entry about configuring JBoss with "just the right stuff."
I haven't used JBoss in a few years, but in v4.0, you could just drop the desired jar files into the deployment directory, and JBoss would load... only those jars.
The correct way to do this, is making a separate profile on your JBoss server that contains only the things needed to use JMS. JBoss v5 comes standard with several profiles: minimal, default, standard, all and web. Each of those starts other services. If you do not specify any profile, you're using the "default" profile.
You can create your own profile starting from a copy of the minimal profile and adding services as needed for JMS support.
The JBoss documentation contains a bit of information on what the files in those profile directories are used for. See Jboss server configurations.
You didn't specify which version of JBoss that you are using. Keep in mind that there are some changes in the configuration between JBoss v4 and JBoss v5/6. The referenced documentation in the answer from Cheeso points to JBoss v4.
I'm making a little project with Seam, Hibernate and JSF. This project run on JBoss 5.1.
My boss wants to deploy this project on WebLogic. I read on the seam documentation that seam and WebLogic don't work fine together.
I would like to know if I can use Hibernate (with JPA) and JSF on WebLogic and what framework (struts, spring?) I can use to replace Seam.
Edit: I read in the seam documentation (chapter 39, weblogic integration) and I find that:
For several releases of Weblogic there has been an issue with how Weblogic generates stubs and compiles EJB's that use variable arguments in their methods. This is confirmed in the Weblogic 9.X and 10.0.MP1 versions. Unfortunately the 10.3 version only partially addresses the issue as detailed below. So, I want to know if other problems like this exist.
Edit 2: I use Weblogic 10.3
What do you mean by "don't work fine together"? I've already seen Seam applications on WebLogic and the Seam documentation provides detailed instruction to run Seam on WebLogic without mentioning any blocking issue.
If you have something specific in mind, please clarify. But in the current state of the question, my advice would be to stick to Seam and to deploy your application on WLS.