glassfish

Glassfish4 + EJB + Spring, deploy fails

无人久伴 提交于 2019-12-13 16:58:42
问题 I am upgrading an application from Java7 on Glassfish 3.1.2.2, to Java8 on Glassfish 4.1. The application is packaged as an ear file, containing a jar-file with remote EJBs and Spring beans, as well as a war-file with a couple of servlets and some webservices. There are only some minor changes done to the actual application, compared to how it was with Glassfish 3.x, the total changes made are: Built with Java8 instead of Java7. Deployed on Glassfish 4.1 instead of 3.1.2.2 Newer version of

Update sql database from FoxPro data on Glassfish server

徘徊边缘 提交于 2019-12-13 16:33:03
问题 I'm building a system which includes JavaFX clients pulling data from a MS SQL server via servlets on a glassfish app server. I also consume some data from a Visual FoxPro database that comes from a legacy system which can't be modified. I'm using the JDataConnect library to create a JDBC connection on the glassfish server against which I can make regular SQL queries to get the data I need. My javafx clients include many tableviews which are bound to ObservableLists of data retrieved from the

Glassfish There is a process already using the admin port 4848

主宰稳场 提交于 2019-12-13 16:21:14
问题 asadmin start-domain domain1 But it shows this error. There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server. I have searched and found that it could be the hostname or that the port is used by an other application or server and actually it is used by TCP. I have no problem with the hostname so I've tried this solution by changing port. asadmin set server.http-service.http-listener.http-listener-1.port=10080 but it shows this error remote

Getting Cannot resolve reference Local ejb-ref not implementing parent interface

本秂侑毒 提交于 2019-12-13 15:09:58
问题 I'm trying to figure out why I need to implement both of these interfaces in order to avoid deployment issues. Java Code ExamplePlanAssembler.java @Local public interface ExamplePlanAssembler { ExamplePlan toBO(ExamplePlanEntity entity); } ExtendedExamplePlanAssembler.java @Local public interface ExtendedExamplePlanAssembler extends ExamplePlanAssembler{ ExtExamplePlan toBO(ExamplePlanEntity entity, ExtExamplePlanEntity extEntity); } ExtendedExamplePlanAssemblerImpl.java @Stateless public

Glassfish 4 Grizzly Threads Heavy CPU usage

天大地大妈咪最大 提交于 2019-12-13 13:33:29
问题 I have a Jersey application running on Glassfish 4 (4.1 build 13), JDK 1.7 update 67 and AWS Linux AMI and I'm noticing that after some hours running it, CPU usage goes up and stays up even though clients are stopped. Running "top -H" identifies 2 http-listener-1-kernel threads with high CPU usage (from a total of 16). I then took a thread dump to check these two threads: "http-listener-1-kernel(3) SelectorRunner" daemon prio=10 tid=0x00007fbc68251000 nid=0xaee runnable [0x00007fbcb55ce000]

Public field in Java

不羁的心 提交于 2019-12-13 13:24:03
问题 I have this Managed bean: import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.sql.DataSource; import javax.annotation.Resource; import javax.faces.context.FacesContext; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; // or import javax.faces.bean.ManagedBean; import org.glassfish.osgicdi

Has glassfish 2.1.1 a bug handling http request and handle them twice?

和自甴很熟 提交于 2019-12-13 12:51:35
问题 I'm using glassfish 2.1.1. I've watched a mysterious http/webservice-call handling. It seams an http request is handled by two different threads. After http basic authentication the first thread is faster. Persisting some data end, but writing response fails in glassfish internal. The second thread fails, because it tries to persist identical data and there are (unique) constrain failures. The response (the failure) of second thread was delivered to client. I don't won't discuss the behavior

IntelliJ not updating Glassfish Deployment

妖精的绣舞 提交于 2019-12-13 08:10:52
问题 IntelliJ is acting odd with its redeployment settings. In the "updating applications" tab it has on the bottom for debugging: , I have tried to use all of the update options in order to update my application (update classes, update classes resources, restart), and NONE work to update my server. I have even closed and rebooted IntelliJ and the updates still don't appear. The update is a simple alert message that is triggered when the index.html is loaded. It works when I load the html manually

Initialization parameters for EJB

ぃ、小莉子 提交于 2019-12-13 07:32:43
问题 I have Singleton enterprise bean, which starts immediately after deploy. I packed EJB into jar and want to distribute it. I set several fields of Singleton like private final String initParam = "value"; . How can I expose those init parameters to administrator who will be deploy my jar onto his own GlassFish server? 回答1: You can use Environment Entries, these should fit your needs. Such parameters must be described in ejb-jar.xml: <enterprise-beans> <session> <ejb-name>YourBean</ejb-name>

Observable pattern in Remote EJB

孤人 提交于 2019-12-13 07:29:51
问题 I have 2 applications. One 'main' and a second one with a Remote EJB. The first application calls the Remote EJB in the second one. Now I want to implement the Observable pattern. But it doesn't seem to work cross-application. So I want my Observable inside the second application, and my Observers in the first. When I try it, it doesn't seem to work. It only works if I make the Observable and Observers in the same application. I got another solution, but I think it's dirty. I could use a MDB