java-ee

Is each webcontainer require it's own Servlet implementation?

We usually get servlet-api.jar along with web/app server. So does it mean each one have it's own implementation of servlet JSR or will they use SUN provided api. Does this applicable to all other J2ee API's like EJB JMS MAIL Thanks, Student ...

What is JAX-MS and where can I learn about it?

Hi, I saw a few job listings asking for expertise on JAX-MS; I have only heard about JAX-WS and JAX-RS so far. Googling for JAX-MS didn't return anything. Is this simply a spelling mistake or there is someone out there that knows what is JAX-MS? One Job asking for JAX-MS ...

What libraries are out there in Java/J2EE and .NET for Coldfusion?

I have always been doing web applications in coldfusion, and not long ago, I needed to generate bar codes for a particular web app, so I searched and one of the results was: http://ricardo.parente.us/2008/09/printing-barcode-from-coldfusion/ In this solution, coldfusion utilizes Java's barbecue library to generate barcodes In coldfusi...

First connect to Glassfish v3 is slow

When trying to connect to glassfish v3 from swing application it is very slow for the first time. Takes 4-10 seconds. On the client side: public void myMethod(){ NewSessionBeanRemote facade; try { InitialContext ic = new InitialContext(); facade = (NewSessionBeanRemote) ic.lookup(NewSessionBeanRemote.class.getNa...

What is Java EE Web Application?

Hi, everyone, I want to ask a question about the java web application. When I start to learn the JSP, I always hear about the Java EE web application. But I don't know the actually meaning of that word. Can anyone explain this word to me? Thank you. ...

What's the "Allow loose classpath" checkbox do in Rational Application Developer

In Rational Application Developer 7.5 under Preferences -> Java EE there's a checkbox with the label, "Allow loose classpath module dependencies (not recommended)". What does that checkbox do, and under what sort of circumstances would I want to check it? ...

declare a transaction in ejb 3.0

Hi, how can I force the EJB to not flush everything after every single command, I want to do a transaction. I've read that this is done somehow declaratively. But how exactly? @Stateless public class SomeBean{ @PersistenceContext EntityManager em; public void doSomeStuffAndThenFlushToTheDb(){ em.persist(entity); // it's flushed ...

Manage persistent context before flushing

hi, consider hibernate-link and JTA as peristence provider. How can I force em not to flush anything, and to handle it by myself? @Stateless public class SomeBean{ @PersistenceContext EntityManager em; public void method(){ em.persist(entity); // will get managed em.clear(); // everything gets unmanaged } } I would ex...

Combining Mapped properties with Indexed properties in Struts

Hello, I'm trying to have a dynamic form and, depending on an attribute type, I would like to display a different input style (textfield, radio buttons, dropdown, checklist, ...). In order to have the dynamic form, I've set up the ActionForm with a Map. Map<String, Object> values; public void setValue(String key, Object value); public ...

EJB testing strategies?

I'm working on a Java EE 6 application. When I started out, I was writing tests for my EJB classes by manually instantiating the EJB, then manually adding the members that normally get provided by dependency injection. As the application gets more complicated, I find that this approach just doesn't cut it. So I'd like to be able to start...

Java EE: Strang behavior when implement logging

I use java.util.logging, and I put the log inside a application managed bean, since I think there should be just one logger for the entire application. @ManagedBean(name="logging") @ApplicationScoped public class Logging { private static Logger logger = Logger.getLogger(Logger.class.getName()); private static FileHandler fh ...

How can i use serializable transactions on JEE 6?

I am learning the new annotations for transaction management, like @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW), but i could not find out how to create a transaction with SERIALIZABLE isolation. Is this possible on a per-method basis or i have to set it on the connection for the whole application? ...

CDI Activate producer packaged in jar

i have a producer, i want to put it in a jar, so that my diff war files can refer the same implementation public class LogFactory { @Produces public Logger createLogger(InjectionPoint injectionPoint) { return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName()); } } but it turns now, glassfish (3.0.1) ...

Jee patterns - Registry and others - relevance

I am reading the book Patterns of enterprise application architecture. While going through the basic patterns - such as Registry pattern I am finding that possibilities that these patterns which were first published in Nov,2002 may not be the best possible solutions to go for. For example take the Registry pattern. In our organization w...

J2EE and Servlets and JSP

Hello all, Is the following statement correct? J2EE includes Servlets and JSP Is the above statement is correct? what some other key features in J2EE I have to know? Thank you ...

Order of JSP page imports

Does the order of the imports in a JSP page matter? I have a JSP page that worked just fine in JBoss 4, but is not compiling in JBoss 6. These are the imports: <%@ page import="com.at.enp.SecurityManager, com.at.enp.util.webUtil, com.at.vb.mod.fa.db.RPData.ResetOption, com.at.enp.modules.loyalty.MetricSetting, ...

UDDI in Glassfish V3?

Does Glassfish V3 either ship with or provide as an extension a UDDI registry? I'm trying to revise for the JavaEE 6 beta exams and I don't any experience of UDDI so I'm trying to code some examples using the API at the same time as read up on it. I've seen there are other alternatives such as jUDDI and my enterprise book mentions that...

Using CDI + WS/RS + JPA to build an app

@Path(value = "/user") @Stateless public class UserService { @Inject private UserManager manager; @Path(value = "/create") @GET @Produces(value = MediaType.TEXT_PLAIN) public String doCreate(@QueryParam(value = "name") String name) { manager.createUser(name); return "OK"; } } here is the u...

Jboss-how to run multible web apps on diffrent ports

i have to run 2 web apps on two diffrent ports , one on default port 80 and other is on 89 port, i am using Jboss 4.2.3 , and i need to depoly both WARs to same JBoss intance. ...

EE 6 (GlassFish): how many containers? How many singletons?

Ok, still trying to understand the basic EE 6 concepts here. I'm hoping someone here can help me out. I'm running GlassFish v3 server Kukla with a single domain. I deploy MyEEApp.ear, which contain MyEEWebApp.war, MyEJBs.jar, and, MyUtilityLibrary.jar. My EJB jar contains a @Singleton bean called MySingleton. I then set up another serv...