java-ee

Scalability of a single server for running a Java Web application

I want to gain more insight regarding the scale of workload a single-server Java Web application deployed to a single Tomcat instance can handle. In particular, let's pretend that I am developing a Wiki application that has a similar usage pattern like Wikipedia. How many simultaneous requests can my server handle reliably before going o...

Old data returned from HttpURLConnection, Glassfish, OpenCSV...?

I'm working on a timer EJB that fetches CSV data from a URL every 5 minutes and processes it into a database using OpenCSV. The relevant code is: @Stateless @TransactionManagement(TransactionManagementType.BEAN) public class Importer { @Schedule(minute="*/5", hour="*", info="Importer") private void scheduledTimeout(final Timer t...

How can i config module and application name for JNDI Lookups

In EJB 3.1 JNDI Lookups can be made with different Lookup-Names: java:global[/<app-name>]/<module-name>/<bean-name>!<fully-qualifiedbean interface-name> java:global[/<app-name>]/<module-name>/<bean-name> java:app/<module-name>/<bean-name>!<fully-qualified-bean-interface-name> java:app/<module-name>/<bean-name> java:module...

How to set the charset with JAX-RS?

How can I set the charset with JAX-RS? I've tried @Produces("text/html; charset=UTF-8") but that was ignored and only text/html was send with the HTTP header. I want to set the charset within a MessageBodyWriter, but don't want to extract the media type by analysing the @Produces annotation via reflection by myself. ...

Spring, Hibernate, Java EE in the 3 Tier architecture

Hello! I need to get a start as to where I put those technologies in the 3 Tier architecture: This is what I have... presentation layer: HTML, JSP app. layer: Java EE, Spring data access layer: Hibernate, PostgreSQL database ...

Questions about Java EE ?

In wiki, it says: Java Platform, Enterprise Edition [...] to deploy [...] distributed, multi-tier Java software, based largely on modular components running on an application server. As far as i know, distributed means "multiple computers" which is equal to "multiple servers", so why it says in the end "running on an application server...

How to start and stop ejbs from outside jboss

hi all, i am developing java ee 5 app based on jboss4.2.3, one of project milestones is to create web-admin tool to stop or restart ejb modules of the application any idea how to achieve this ?, i appreciate if some one recommend a short developer guide for jboss ...

Getting current Java EE documentation - broken links / offer expired

Hi Everyone. I'm having trouble getting the current Java EE documentation from the Oracle website [NOT the API documentation - supporting documentation as described below]. I've even tried creating a new account with Oracle to see if my original sun account had some problem. I get to this page:http://www.oracle.com/technetwork/java/ja...

How do I upgrade an existing enterprise project from Java EE5 to Java EE 6 in Netbeans (6.9)

The project has an EJB module & a web module. Changing the server is easy, but I'd like to switch to EJB 3.1 also but I believe I need to change all kind of configuration files since I can't do it from the project properties window(s). Any tips or links do useful documentation will be greatly appreciated. Thank you! ...

How to install OpenEJB as a JEE "server" in NetBeans 6.9?

When trying to configure a new service under "servers" one has to chose a pre-defined server profile (Glassfish, JBoss, Sailfin, Sun or Tomcat). How can I create a new definition to use OpenEJB? Thanks ...

How is it to return a very long list from ejb3 session bean?

I have a ejb3 session bean and a servlet. The bean have access to a database with some big table. The servlet should retrieve the table's content from the bean and send data through ServletOutputStream. How I can transfer big data between ejb3 bean and servlet? I can't return a list with all rows at once because it doesn't fit in memory....

EJB3 RMI client

Hello Everybody! I'm currently working with on a fat client application using a self written RMI server (10 years ago). The server sends EJB1.1/2.0 beans to the client who has full access to these remote objects. After commiting a transaction, all dirty beans are persisted by the server. The plan is to replace the server by a JBoss5 & ...

Java maven development slow

I am developing a war/java website that is built via maven. Currently, I have to make changes... tell maven to build them... then deploy to Tomcat. This is around 40seconds. So every change I make, I have to wait >=40seconds to see the change. This is becoming very frustrating, so I have tried to speed up the deployment. I deployed ...

Target Unreachable when Access a composite key from JSF

Inside my JSF I did <h:outputLabel value="Group:" for="group" /> <h:inputText id="group" value="#{newUserController.group.groupKey.groupId}" title="Group Id" /> Group.java @Entity public class Group { @EmbeddedId private GroupKey groupKey; @ManyToOne @JoinColumn(name="userId") private User user; //setter, g...

JSF 2.0 (Facelets) and Struts

Hello I am a newbie with Java EE 6. I started with JSF 2.0, Facelets, Managed Beans and really liked it. It was a great switch from JSP and servlets. It also made me a confused person. It may be the lack of my knowledge, but I have many questions swirling in my mind. Are Facelets and Managed beans a direct replacement of JSP and Servle...

Application Client Traffic Overhead in GlassFish v3

I have an EAR application with Application Client module. When this EAR file is deployed on GlassFish v2 and Application Client module is present in the cache, amount of the traffic between the client machine and the server during Application Client launch is approx. 0.7KB. But when I deploy this application on GlassFish v3 and launch ...

What is a good stack/cms for a java based enterprise intranet?

I am considering hippo It need to have a debian/ubuntu friendly licence. Thanks, ...

JPA: Weird error when I try to persist an object

I got a OneToMany relation between User and Group Group.java @Entity public class Group { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String groupid; @ManyToOne @JoinColumn(name="USER_FK") private User user; ... } User.java @Entity public class User { @Id @GeneratedValue(strategy = Generat...

javax.persistence.OptimisticLockException + org.hibernate.StaleObjectStateException

Hi! I'm catching javax.persistence.OptimisticLockException which works great, but I'm getting the stacktrace of StaleObjectStateException in my server log. I've checked and the getCause() on OptimisticLockException returns StaleObjectStateException, but why is it printed out to server.log? It's really annoying, I'm writing a test, where...

How does Hibernate's batch-fetching algorithm work?

I found this description of the batch-fetching algorithm in "Manning - Java Persistence with Hibernate": What is the real batch-fetching algorithm? (...) Imagine a batch size of 20 and a total number of 119 uninitialized proxies that have to be loaded in batches. At startup time, Hibernate reads the mapping metadata and c...