java-ee

Limit a JPA ManyToMany based on a value of the joined table

Assuming I have the following mapping (code reduced to focus on problem) public class User { @ManyToMany private List<Product> products; } +----+---------+-----------+--------+ | id | user_id | product_id| status | +----+---------+-----------+--------+ | 1 | 1 | 1 | 1 | | 2 | 1 | 2 | 0 | +---...

Best IDE for Java Web Development

I've been using NetBeans for the past year creating java web apps. Recently I've begun a project using GWT and I've been using Eclipse. Perhaps it's that I'm accustomed to NetBeans, but Eclipse doesn't appear to be as polished as NetBeans. Am I alone in my experience? A lot of people seem to love Eclipse, but I can't figure out why. ...

Why is Java frequently used for enterprise applications?

Hi! As a Java newbie I'm wondering: of all the languages in the world, why is Java frequently used for enterprise applications? What makes it that way compared to the other languages? Will it continue to be this way in the upcoming years? I'd appreciate your insights. Thanks in advance :) ...

How to profile session memory usage in Java/Seam web application?

Is there any way/tool to profile per-session memory usage in a Java web application? More specifically I'm using Seam and I have a few objects which are specific for the user or for the user's current session so they're set to be stored in the user's session. Some time ago my application would run out of memory when hitting a certain n...

study roadmap for newcomer into java ee

I'm the newcomer into java ee,I have studied about core jave,servlet,jsp. Could anyone give me some suggestion(some books,forums,etc) on how to promote my skills into jave ee? Thanks a lot in advance. ...

Dynamically generate ice:commandButton components

Hey all, I've been trying a lot of different things that I would think would work like expected. However, they are causing me some frustration. Here's the scoop: I am using ICEFaces 1.8 components in a Java EE web application. My goal is to render a bunch of ice:commandButtons on the page based on a query to my database. I want these b...

Newbie question about Java

Okay, I know that Java is a language but somebody has asked me if they can write a web application to interface in with a web app I've written in ASP.NET. I'm implementing a web service to serve up an XML so it's pretty language agnostic. However, I'm not 100% sure whether going down the Java route makes a lot of sense. I was kind of ex...

EJB Factory Class

Hi all I'm trying to create an EJB factory class, which works like this: You have a method which takes as argument a class of an EJB, then it checks whether the EJB has a remote interface (if not throw an exception) and if it does, it returns the concerning EJB. The code below does exactly this. However the object it returns is of the ...

Using Java RMI, when exactly is the serialized object transmitted over the network ?

I am using RMI to implement some distributed algorithm, and since we're transmitting quite big objects, I'd like some precisions about when RMI transmits serialized objects over the network. Suppose I have a Remote classe with the following method. class MyServer extends Remote { public synchronized void foo (Bar bar) { ......

Execute an external EXE from Flex/AIR or Java Web Application..

Hi, Need to execute an external EXE from either a Java web app (running on Glassfish on Windows Server) or from an Flex/AIR desktop app. Any suggestions, links? Thanks, ...

How to consume a webservice from an EJB

I am currently trying to wrap my mind around Java EE 5. What I'd like to do is create a sample application that offers a simple stateless EJB (e. g. a simple calulator with an add() method) expose this add method as a webservice consume this webservice from another EJB The first two steps are easy and I can deploy and test this bean ...

Which one should I learn? Spring+Hibernate or Java EE?

I've been doing some Java development, and have learnt my basics. I would like to take my skill to the next level by learning frameworks that are mainstream. I hear about Spring + Hibernate all the time. Lately, there has been some talk on Java EE with EJB 3 etc. I know there is a lot of war going on, but I'm looking for an answer. I k...

Starting JEE MVC

I'm trying to learn JEE, starting with Servlets and JSPs in an MVC architecture. I know Servlets are often used as the controller and JSPs are often used as the view, and that these both interact with the model, the back end java application on the server. The question I'm asking is what the back end application would consist of. Is it n...

What does Exploded Development mean? (In Java)

I came across the term "exploded development" on this site... http://www.zeroturnaround.com/javarebel/support-matrix/ and remembered hearing it before in relation to working with Java web applications. From what I can tell it is something to do with deploying your .war file as an extracted/raw set of files. Instead of using an ANT/Ma...

Software to find differences between server configurations

In order to troubleshoot a Java Web app that works in one server but not in a others, we are looking for software to find the software/registry/version differences between Windows 2003 servers. Does anyone knows of a free or commercial product that can help us do this? ...

JAX-WS client: JAXB required?

Hello! I need to "dive into JAX-WS programming". So, I played around with Netbeans, after 20 or so erroneous attempts, finally managed to let a web service client execute a web service. I noticed, that a lot of code is generated, especially JAXB classes for the web service response. My current task is, to write a web service and web ...

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 ...

An issue dealing with JSP Session

I'm having an inconvenient dealing with sessions.. I have this: www.mydomain.com sub1.mydomain.com sub2.mydomain.com sub3.mydomain.com and when I log into "www", then I change to "sub2" (for example) I figure out it creates another session :S why is that?? I need the same session for www, sub1, sub2, sub3, and so on.. ALL in "mydomai...

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-...

How to exclude classes from a packaged webapp with maven.

How can I filter certain classes in /target/classes from going into /target/[webapp]/WEB-INF/classes? I want them compiled into /target/classes/ but not in the final war. ...