how to enable hot deploy in tomcat
I ended up using HotSwapAgent tool. That’s a free alternative to JRebel
I ended up using HotSwapAgent tool. That’s a free alternative to JRebel
Tomcat as being a barebones servletcontainer provides indeed only JSP, Servlet, EL and WS APIs out the box. You can however just provide JSF, JSTL, CDI, JPA, Hibernate, Spring, etc yourself along with the web application in flavor of JAR file(s) in the /WEB-INF/lib folder and some configuration files where necessary. EJB is only a … Read more
You need add to the persistence.xml the next line: <exclude-unlisted-classes>false</exclude-unlisted-classes> e.g. <?xml version=”1.0″ encoding=”UTF-8″?> <persistence version=”2.0″ …> <persistence-unit name=”YourPU” …> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties> <property name=”eclipselink.logging.level” value=”ALL”/> <property name=”eclipselink.ddl-generation” value=”drop-and-create-tables”/> </properties> </persistence-unit> </persistence>
You need to create a custom ResourceResolver which resolves resources from classpath, put it in the common JAR file and then declare it in web-fragment.xml of the JAR (or in web.xml of the WARs). Kickoff example: package com.example; import java.net.URL; import javax.faces.view.facelets.ResourceResolver; public class FaceletsResourceResolver extends ResourceResolver { private ResourceResolver parent; private String basePath; public … Read more
(1) , (3) : Yes. You are right .Both the load() and get() will first check if there is an instance with the same PK is persisted in the session. If yes , just returns that instance from the session. (It may be the proxy or the actual entity class instance) If no , load() … Read more
This is what LISTEN/NOTIFY was created for. The only drawback is that you will need to have some kind of background thread that polls the database on a regular basis to see if any notifications are available. You can also use the code from the Postgres Wiki to have a starting point
You can absolutely do what you mention and use @RequestScoped beans in an @Stateless session bean and an @MessageDriven bean. This is a core part of the CDI spec and TCK and guaranteed portable. Note on MDBs Do be aware that there is a test for a @Stateless bean that uses a @RequestScoped bean, but … Read more
There seems to be some confusion between 3 variants of deployment: An EAR that includes an EJB and WEB module Deploying a separate EJB module and a separate WEB module Deploying a WEB module that includes EJB classes or an EJB jar. In the first situation, you have logically one application, but one that is … Read more
It is just getting a system property. Retrieving system properties requires permissions which the calling code may not have. The doPrivileged asserts the privileges of the calling class irrespective of how it was called. Clearly, doPrivileged is something you need to be careful with. The code quoted is the equivalent of: String lineSeparator = java.security.AccessController.doPrivileged( … Read more
You didn’t mention anything about the implementations you’re using so it’s hard to say anything about them 🙂 I don’t know if your benchmark is representative of anything, I’m not sure it allows to make any valid conclusion. JAX-WS is supposed to perform better in general than JAX-RPC, see the already mentioned article. JAX-RPC is … Read more