java-ee-6

A methology that allows for a single Java code base covering many different versions?

I work in a small shop where we have a LOT of legacy Cobol code and where a methology has been adopted to allow us to minimize forking and branching as much as possible. For a given release we have three levels: CORE - bottom layer, this code is common to all releases GROUP - optional code common to several customers. CUSTOMER - optio...

How do you call List.size() from a JSF 2.0 Facelets Template?

What is the syntax for calling list.size() in a JSF 2.0 Facelets template (eg, using an h:outputText element)? ...

Differences between JPA and JPA2

Does anyone have a list of the changes between JPA 1 and JPA 2? I have read about the Criteria queries and other changes, but I would like a "what's new" kind of reference. Thanks ...

@WebServlet annotation support in java 1.6.013

Hi, I'm stepping into the world of Servlets and 3.0 in particular and I saw certain methods and annotations used in examples and tutorials which talked about this being available when JAVA 6.0 is released (which it has) and now when I try to use the above annotation for example in Eclipse it does not recognize it although I have java 1.6...

Spring - Ways to include a jar which itself is using Spring in a Spring project

I need to use some 3rd party jar in my project. The project is a Spring project and the jar is also using Spring. Is there a way by which I can include the 3rd party jar in my project? I am finding it difficult to find each and every dependency of the 3rd part jar and inject it. ...

Spring - When should I consider loading another context in same JVM?

I was just thinking that when should I actually consider loading more than one application contexts in Spring? All so far I have been merging the context files with <include> such that only one application context loads up. Do you have an idea about when to go for more than one application contexts in the same JVM? ...

Spring - How to load a new hierarchical context?

Hello, Has anyone tried loading multiple hierarchical contexts (parent/child) using Spring? Could you explain how to do that as I could not locate enough documentation on this? Thanks in advance. ...

Spring - Weird Error in Bean Creation

Any idea why I am getting this exception? Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myService' defined in class path resource [context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type...

Spring - StackOverflowError in Bean creation

Hello, I am getting the following error: java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExe...

Spring - How 'multiple' AOP behaviors to sevices are resolved?

Hello, I want to know that whether we can apply 'multiple' AOP behaviors to our service classes or not? Lets just say, i do this to my BankServiceImpl class: @Transactional on top of one of the method, accountTransfer(), and and some custom <aop> pointcut on the execution of another method someOtherMethod(). Then will Spring be able...

Java EE6 over EE5 ?!

We are at the edge of getting Java EE6 (with Glassfish v3 as reference implementation). Planned release is December 09. While still quite a number of companies are struggling to move their codebase to EE5 (from earlier versions), we are in the luxurious situation to start development of a new product and could choose to do it with EE6 as...

ASM jar - Why my java project has a dependency on this?

I have a Java project and internally it is dependent on asm jar. Strangely, I don't even know why my project somehow is dependent on this library (might be brought in by maven as a transitive dependency)? Can anyone help me know why some one needs asm jar? Thanks in advance ! EDIT: Can you also mention for what purposes/use-cases one ...

Scope of jsp:useBean

home.jsp <jsp:useBean id="username" class="java.lang.String" scope="application"/> <% username="Jitendra"; %> <jsp:include page="include.jsp"/> include.jsp <%=username%> This gives an error saying “username” is undefined in include.jsp, even though the scope of Bean is application… ...

Which web containers install themselves well as a Windows service?

We have had a web application product for several years, and used Tomcat to deploy it under Windows as it registers itself as a Windows service so it starts and stops automatically. We may now happen to need more JEE facilitites than is provided by Tomcat (we are very tempted by the JEE 6 things in the container) so the question is whic...

EJB 3.1 @EJB Injection into POJO

Being a complete turbot this afternoon and cant seem to find the answer anywhere. With the new EJB 3.1 spec is it possible to inject an EJB into a pojo? I know in EJB 3.0 the @EJB annotation could be used to inject an EJB but this did not work on simple pojos. If it is not do I have to look the bean up in JNDI as I know you cannot sim...

Inject EJB into domain object with Java EE 6

How can I inject an EJB into a domain object (an JPA entity) with Java EE 6? ...

install jee6 doc on netbeans

netbeans 6.8 ubuntu 9.10 i am able to build the sample applications, but the doc in the code assistant popup is missing (when type Ctrl + Space) how to fix this? ...

JDBCrealm FORM based problem. But BASIC working perfectly alright!

Hello, I successfully configured Glassfish to work with JDBCrealm using Basic Auth. But it's not working for Jsp page. My jsp page is simple using j_security_check and j_username and j_password. It throws me to UnAuthorizedAccess page (login error page). It's strange that it's working for basic auth and not for form based. What can be ...

How can I use Glassfish's JMS Broker to "proxy" a message on to a JMS Broker on the internet?

I am working on a Java EE 6 Enterprise Application that runs on my local Glassfish3 installation. One of my EJBs needs to send messages to a remote JMS Broker which is located somewhere on the Internet. Unfortunately, the Internet connection is rather unreliable, so my idea is to first send the messages to the local Glassfish's own JMS...

Trouble creating unique table of Strings when persisting List<String>

Suppose I have an entity: @Entity public class AnEntity implements Serializable{ @ElementCollection private List<String> strings = new Vector<String>(); // other stuff } I am using EclipseLink(JPA 2.0). The strings in this List may have the same values in many AnEntity objects. That is to say, many AnEntity objects may referen...