java-ee

Is it okay to pass injected EntityManagers to EJB bean's helper classes and use it?

不想你离开。 提交于 2019-12-18 11:35:39
问题 We have some JavaEE5 stateless EJB bean that passes the injected EntityManager to its helpers. Is this safe? It has worked well until now, but I found out some Oracle document that states its implementation of EntityManager is thread-safe. Now I wonder whether the reason we did not have issues until now, was only because the implementation we were using happened to be thread-safe (we use Oracle). @Stateless class SomeBean { @PersistenceContext private EntityManager em; private SomeHelper

Notify user about session timeout in Java EE

妖精的绣舞 提交于 2019-12-18 11:35:32
问题 My requirement is to notify the user with a popup saying that the user session is about to time out in x seconds in case user does not perform any activity on the web page. Addition to this requirement is to decrement the value x seconds dynamically in the popup. The environment I use is Java EE. 回答1: Make use of HttpSession#getMaxInactiveInterval() and setTimeout(). There's no need for Ajax in this particular purpose, unless you want to postpone the timeout on every client activity (polling)

Weblogic Error 403--Forbidden

我的未来我决定 提交于 2019-12-18 11:28:39
问题 I am trying to run a Java EE application on weblogic. The application works fine on Tomcat. I have customized the war file to include weblogic.xml. This file includes the following code:- <container-descriptor> <show-archived-real-path-enabled>true</show-archived-real-path-enabled> </container-descriptor> I have also changed the configuration in properties file of the application to reflect the port on which container is listening. server.port=7001 server.modjk.enabled=false My web.xml file

Weblogic Error 403--Forbidden

泄露秘密 提交于 2019-12-18 11:28:07
问题 I am trying to run a Java EE application on weblogic. The application works fine on Tomcat. I have customized the war file to include weblogic.xml. This file includes the following code:- <container-descriptor> <show-archived-real-path-enabled>true</show-archived-real-path-enabled> </container-descriptor> I have also changed the configuration in properties file of the application to reflect the port on which container is listening. server.port=7001 server.modjk.enabled=false My web.xml file

Clojure and Java interop in a real world

烈酒焚心 提交于 2019-12-18 11:11:37
问题 I'm thinking about start using (not playing with) Clojure. Are there any useful guides? I'm not asking about lein, javac or any other 'small' manual tools. I need to know how to have Java and Clojure sources in eclipse in the same project. How to make them calling each other without compilation errors? How to configure maven? How to set up fully productive development environment? Is it even possible at the moment? What plugins may be useful? Where to start? 回答1: I have a fully working

Clojure and Java interop in a real world

一世执手 提交于 2019-12-18 11:11:33
问题 I'm thinking about start using (not playing with) Clojure. Are there any useful guides? I'm not asking about lein, javac or any other 'small' manual tools. I need to know how to have Java and Clojure sources in eclipse in the same project. How to make them calling each other without compilation errors? How to configure maven? How to set up fully productive development environment? Is it even possible at the moment? What plugins may be useful? Where to start? 回答1: I have a fully working

Cannot import javax.ejb.* packages

人走茶凉 提交于 2019-12-18 11:07:36
问题 I am having trouble in building an EJB session bean. The following packages cannot be found: import javax.ejb.LocalBean; import javax.ejb.Stateful; import javax.ejb.TransactionManagement; import javax.ejb.TransactionManagementType; Some solutions implied adding the libraries j2ee.jar and javaee .jar to the java build path. I am using jdk-7u75-windows-x64 and java_ee_sdk-7-windows-ml and cannot find any of these libraries at the given location($JAVA_HOME\lib). I am using eclipse(kepler) on a

Unknown version of Tomcat was specified with tomcat-7.0.42

时间秒杀一切 提交于 2019-12-18 10:58:10
问题 I want to add latest tomcat-7.0.42 in my eclipse. Probably eclipse tomcat server adapter 7 only supports tomcat version upto 7.0.12 .. So please help me how can I configure my eclipse with tomcat-7.0.42 回答1: You are specifying tomcat source directory. You need to specify tomcat binary installation root directory, also known as CATALINA_HOME. Usually, this is where you untar apache-tomcat-7.0.42.tar.gz file. 回答2: This happened to me because Tomcat was still in the process of downloading (

MS Access Programming Overview [closed]

最后都变了- 提交于 2019-12-18 10:57:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 13 days ago . I'm a Java EE developer and was just contacted by someone who wants me to put a quote together for an application for his business that can integrate with their MS Access "backend". I was hoping to post this and just get a general high-level overview of best practices involved with MS Access Programming. I

push notifications on all 3 platforms (android,ios,windows phone) [closed]

走远了吗. 提交于 2019-12-18 10:48:24
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I'm planning a cross-platform app. Is it possible to implement push notifications on all 3 of them (iphone, android, windowsphone)