glassfish

How is a $Proxy$_$$_Weld$EnterpriseProxy$ proxy subclass implemented?

偶尔善良 提交于 2020-01-23 09:27:50
问题 In a Java EE 7 application, let's say I have a session bean class " @Stateless public class MyEJB ". When debugging under Glassfish 4, I can see that a proxy subclass named MyEJB$Proxy$_$$_Weld$EnterpriseProxy$ was created (in order to provide Java EE container services to the EJB). I am trying to figure out how these proxy subclasses are implemented. Is there a standard Java EE SPI which the proxy implementation calls, for example, to demarcate a transaction? Or is this done through

EJB3 Glassfish JNDI lookup

风格不统一 提交于 2020-01-23 07:21:09
问题 I am using Glassfish-bundled Eclipse IDE. I wrote a simple EJB application. but it doesn't work. @Stateless @Remote(CalculatorRemote.class) @Local(CalculatorLocal.class) public class Calculator implements CalculatorRemote, CalculatorLocal { @Override public String sayHello(String name) { System.out.println("ejb:"+name); return null; } } ---- @Remote public interface CalculatorRemote { public String sayHello(String name); } ------- @Local public interface CalculatorLocal { public String

How can we use JPA2 (Hibernate) entities as DTO's between two webapps?

删除回忆录丶 提交于 2020-01-23 07:08:26
问题 Hi guys We're running on Glassfish 3.0.1 and using Hibernate 3.5.3. Our project setup looks like this: frontend.war common.jar backend.war We would like to put our jpa2 annotated entities in common.jar in such a way that the backend treats these as JPA2 entities, but the frontend should only see these as POJO's/DTO's. We thought this could be accomplished bu putting persistence.xml in backend.war and having no persistence.xml in the frontend. This doesn't work, after starting up the backend

Where can I find Glassfish logs on Windows 7?

允我心安 提交于 2020-01-23 06:33:47
问题 I can't find the Glassfish logs on windows 7. I would've expected a /glassfish/logs folder, but having searched the glassfish directory I don't see them. 回答1: It's inside /glassfish/domains/[domainname]/logs where [domainname] is the server domain name, which defaults to domain1 . 回答2: Webnet are you running Glassfish from Netbeans? I had the same problem expecting to find glassfish logs in C:\Program Files\glassfish-3.1.1\glassfish\domains\domain1\logs I ended up finding them here: D:\Users

force glassfish 4 to use jackson 2.3

五迷三道 提交于 2020-01-22 16:17:22
问题 I wrote an maven application which should run on Glassfish 4. The Standard ApplicationConfig looks like this: @javax.ws.rs.ApplicationPath("resources") public class ApplicationConfig extends Application { @Override public Set<Class<?>> getClasses() { Set<Class<?>> resources = new java.util.HashSet<Class<?>>(); // following code can be used to customize Jersey 2.0 JSON provider: try { Class jsonProvider = Class.forName("org.glassfish.jersey.jackson.JacksonFeature"); } catch

force glassfish 4 to use jackson 2.3

寵の児 提交于 2020-01-22 16:16:05
问题 I wrote an maven application which should run on Glassfish 4. The Standard ApplicationConfig looks like this: @javax.ws.rs.ApplicationPath("resources") public class ApplicationConfig extends Application { @Override public Set<Class<?>> getClasses() { Set<Class<?>> resources = new java.util.HashSet<Class<?>>(); // following code can be used to customize Jersey 2.0 JSON provider: try { Class jsonProvider = Class.forName("org.glassfish.jersey.jackson.JacksonFeature"); } catch

How to use CDI Events in Java Jersey?

送分小仙女□ 提交于 2020-01-21 11:57:22
问题 I am trying to follow this post's upvoted answer: Best practice for REST token-based authentication with JAX-RS and Jersey I'm using the CDI approach and in my filter i have the definition: @Inject @AuthenticatedUser Event<String> userAuthenticatedEvent; But, when I run tomcat 7, I get the following error: org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl(requiredType=Event<String>,parent=AuthenticationFilter,qualifiers={

Glassfish 3.1.1 suddenly stopped writing to server.log

一个人想着一个人 提交于 2020-01-21 04:39:45
问题 I changed one of the log levels in the admin console, and Glassfish 3.1.1 stopped writing anything into the domain1/logs/server.log. I since reverted the change and tried restarting the server a couple times. Here's the last thing it logged: [#|2012-02-20T16:44:53.738-0800|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=46; _ThreadName=Thread-7;|com.sun.webui.jsf.component.DropDown::The current value of component form1:basicTable:rowGroup1:6:col3

HttpServletResponse seems to periodically send prematurely

眉间皱痕 提交于 2020-01-20 08:39:05
问题 I'm working on a setup that takes an http request (GET for testing purposes) to java servlet. How it works is, the ser let takes a request from the browser, parses it and sends it via TCP socket to the 'main' server, which processes the request and sends a response back. The servlet then pulls the HttpServletResponse that was previously stored in an ConcurrentHashMap, opens up the PrintWriter, and sends a response back. Everything's going smoothly, except that the HttpServletResponse doesn't

HttpServletResponse seems to periodically send prematurely

我与影子孤独终老i 提交于 2020-01-20 08:38:27
问题 I'm working on a setup that takes an http request (GET for testing purposes) to java servlet. How it works is, the ser let takes a request from the browser, parses it and sends it via TCP socket to the 'main' server, which processes the request and sends a response back. The servlet then pulls the HttpServletResponse that was previously stored in an ConcurrentHashMap, opens up the PrintWriter, and sends a response back. Everything's going smoothly, except that the HttpServletResponse doesn't