j2ee

How do you introspect web.xml from a servlet?

Is there a way for a servlet filter to get a list of all servlets and their mappings? ...

Dealing with J2EE fragmentation

Embarking on a another new serverside project (java based) and the question here is whether to stick to pure J2EE based approach or mix and match the best tools based on open source frameworks. After J2EE 1.4, we are seeing a plethora of technology choices like Spring ( borderline as to when it exactly came out but feel that popularity s...

Glassfish JNDI Tree Linking

Hello, We are using Glassfish v2 (9.1_02) at work. Our servers are not set up in a clustered environment. We would like to have one main server as a JNDI server that can serve DataSource objects, and possibly other objects in the future, and link other servers to this one server. This way, if we change the location of a database or cha...

Connecting Java se Client to Glassfish

We are having some difficulties connecting our Java SE standalone client with the EJB module deployed on a remote GlassFish server. Pointers to how we are supposed to connect our client would be appreciated. The client code we currently has to get the initial context: props.setProperty("org.omg.CORBA.ORBInitialHost", "*remotehost*"); ...

Java Execution Context Class Explain

I wanted to grab the concept of "Execution Context class" . I'm refering to this post at http://tinyurl.com/ryjn5o . Can anyone enlighten by explain more on how to create such class ? ...

Indirectly generate sequence numbers for composite primary keys with JPA

I have a JPA entity class with a composite primary key (uid,lid) that in the database should look like this; UID | LID | ... --------------- 1 | 1 | ... 1 | 2 | ... 1 | 3 | ... 2 | 1 | ... 2 | 2 | ... 2 | 3 | ... How can I make EclipseLink/JPA generate sequence numbers on the fly, or how can I find out the high...

ThreadLocal when using hibernate session/JDO persistenceManager

I trying to understand the best prastice of using ThreadLocal for the above questions. From my understanding the reason of using this is to ensure only one session/pm created for entire application. My question is is there any impact of using threadlocal like this on clustering application? (example google app engine) ? if u use "trans...

Seam and Dojo vs RichFace or IceFace ..

I am just scratching my head on using DoJo in Seam in place of RichFaces or IceFace. I couldn't find any article or tutorial out there in the web. The reason for my question is that Iam coming out of a DoJo/Domino project and like to have this project in J2EE/Seam/DoJo. Appreciate any input... TIA. ...

How to create custom object pools in Java application server

Suppose I have a message driven bean (MDB) in a Java application server. The MDB receives a message from a JMS queue and passes it to a message processor. In my case, a message processor is an extremely heavy weight object that requires extensive initialization so I don't want to create a new one to handle each message. Instead I would l...

Query.executeUpdate() results in XAResource exception

I'm running Spring and Hibernate's implementation of JPA on Sun's GlassFish Enterprise Server with MySQL. When I try to delete stuff from the database: Query q = entityManager.createQuery("DELETE FROM SomeEntity e"); q.executeUpdate(); I get the error: Caused by: java.sql.SQLException: Error in allocating a connection. Cause: java.l...

J2EE application server libraries

I am working with a team of programmers developing web applications for a J2EE Application Server (currently using JBoss but switching to GlassFish in the near future). We were wondering whether we should install the libraries used by our applications on the J2EE server itself or package these libraries with every .war file that we deplo...

most popular j2ee based websites

J2EE as I understand is used to build Enterprise applications. My question is :What are the most popular public facing(internet) sites using j2ee stack. The one's that I know of are : linkedIn.com ,evite.com and sun ibm and oracle (obviously) Eclipse.org uses php, I wonder why? If you have worked on/know any other sites, can your s...

Maven: Including a META-INF folder in the classes folder.

Hello all, I have a very simple war project and I want to include a folder:META-INF at the top of the classes output folder where all the compiled java classes are. Im doing this by using maven but it seems that by default maven won't include anything that is not a java class. So it ignores my META-INF folder that is sitting at the top...

Session not staying active in my web application.

Hi In my web application the JSESSION isn't staying active. I have enabled a JDBC Store on tomcat but this has still not fixed it. Any other suggestions. Thanks in Advance Dean ...

J2ee packaging - where should 3rd party libs go?

I'm working on an older j2ee project. It runs on JBoss. It deploys various ears and wars. It also requires many jar files in the $JBOSS_HOME/server/default/lib directory. Should those all be moved to the ear and war files? ...

Keep having to login in Web application

Hi I have written something using the j_security_check. Yet i keep having to login. My web.xml file looks like this: ` FORM /login.jsp /loginFailed.jsp <security-role> <role-name>admin</role-name> </security-role> <security-role> <role-name>user</role-name> </security-...

Apache Tomcat (6.x) SessionID placement

Hey guys, I need to know which class in Tomcat (6.x) is responsible for placing the SessionID either into a cookie or appending it to the request. Is this done after all Filters are passed? I need to modify the SessionID before the response is sent to the browser... ...

j2ee input output stream

i want to creat a pipe between clint browser<->my server <-> some other server .For downloadin some file. I am using apache tomcat as my server. How can i create the pipe via my server ? i dont have mucg space on my server . So i dont wan to save files on my server .I just want the download data to go via my server due to some reasons....

Create navigation menu dynamicly based on deployed jars.

Hi, I am just investigating the idea of this so have no example code. I've been digging around on the web but I'm not really sure what I should actually be looking for so I'm not finding much. So I thought I'd ask and see if anyone knew if a) This is possible. b) How I should do it. (Or at least what I should be looking to learn about t...

Add Jar to Runtime Path for JSP

I'm using IBM's Rational Software Architect (essentially Eclipse I suppose). I have a JAR file that contains Proxy classes to access a Web Service (JAX-RPC). I've created a Dynamic Web Project with a simple JSP page in which I'm trying to consume the Web Service using a Proxy class from this library. Code from the JSP page: <jsp:useBean...