java-ee

request.getSession() creating new session after sendRedirect()

耗尽温柔 提交于 2020-01-04 04:41:13
问题 We are developing travel application. Through this flight, Hotel, Bus tickets will be booked. It is product based application. Nearly we have 25 clients(3 clients are using, for remaining still developing). We are maintaining one server for all clients. One server(application) multiple clients is the great achievement in my application. But the problem is every client is having different payment gateways for their money transfer like EBS, HDFC, ICICI, ATOM etc. We have to use sendRedriect()

Restrict tomcat access by ip [closed]

淺唱寂寞╮ 提交于 2020-01-04 04:40:33
问题 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 7 years ago . I want to restrict access to a webapp running on a tomcat server by ip address. Found out that I would have to use org.apache.catalina.valves.RemoteAddrValve and set it in a tomcat context.xml But within my tomcat folder I have 4 of it: \conf \backup \webapps\host-manager\META-INF webapps\manager\META-INF Where

Maven ear project with ejb and war modules

天大地大妈咪最大 提交于 2020-01-04 04:19:09
问题 im working on a web application with maven and Jboss 7 wich conatins 3 modules ejb ear and war so the war will have the ejb as dependancy and the ejb will be in the same time a module of the ear so when i do this i get the same ejb twice this tree ear ...Mywar ........Myejb ...Myejb is this structure is correct or i should change another the pom.xml for the war : <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/

How can I set isolation levels per method in EJB 3

余生颓废 提交于 2020-01-04 03:52:48
问题 Is it possible to set the database isolation level (ie Serializable, repeatable-read etc) for a given EJB 3 method call? I understand that this is not covered by the EJB Spec, so details of how to do it on either a JBoss or Glassfish specific manner would be great. I'm starting to get the impression it's not possible and that you can only set it per Connection Pool which is clearly by no means an ideal solution. 回答1: This is indeed not covered by the spec and but can be configured through

Is JavaEE really portable?

跟風遠走 提交于 2020-01-04 03:01:20
问题 I'm just implementing a JavaEE assignment I was given on an interview. I have some prior experience with EJB, but nothing related to JMS and MDBs. So here's what I find through the numerous examples: application servers bind their topics and queues to different JNDI names - for example topic / queue , jms the activationConfig property is required on JBoss, while in the Sun tutorial it is not. after starting my application, jboss warns me that my topic isn't bound (it isn't actually - I haven

@Schedule annotation in Java EE

丶灬走出姿态 提交于 2020-01-04 02:57:29
问题 I use the following annotation to call a stateless session bean once a 5 minutes: @Schedule(second = "0", minute = "0/5", hour = "*") I works as expected, except it stops itself after a few days. I guess there may be a default lifetime and I do not know how to override it. Please help me to configure the scheduler to run indefinitely. 回答1: to know if there is expiration date for your object you can use getTimers() to return an object of that timer then use this method getTimeRemaining() to

How are the jsf-api and jsf-impl related?

孤街醉人 提交于 2020-01-04 02:40:11
问题 For some time I am struggling to get an arquillian test case running. This test involves classes rooted in JSF classes and it ran into an ClassFormatError: Absent Code as the implementation for the javax.faces.model.DataModel could not be found. My assumption was that I need to provide my test with a JSF implementation, but the implementations I found (for example the one bundled with JBoss) do not have the javax.faces package, only com.sun , and I could find no trace of the DataModel class.

What is annotation to override transaction timeout?

不羁的心 提交于 2020-01-04 02:34:06
问题 New to EE - trying to reconfigure Weblogic's default timeout of 30 seconds without having to write up a weblogic-ejb-jar.xml file. I've used only annotations now but the only thing that I have seen is in the DD here: <transaction-descriptor> <trans-timeout-seconds>1200</trans-timeout-seconds> </transaction-descriptor> Anyway to avoid have a descriptor file just for this? 回答1: I feel weird answering my own question but someone at work found this annotation. @ weblogic.javaee

What are “Java EE 7 API Library” and “Java EE Web 7 API Library” and when to use them?

笑着哭i 提交于 2020-01-03 19:31:25
问题 I have a full-fledged Java EE project running on GlassFish 4.1 / Java EE 7 (NetBeans 8.0.2) not using Apache Maven. Depending upon the project functionality, the CDI dependency has to be added to both the projects/modules namely the EE module and the Web module (and a class library, if any). I have been confusing for a long time seeing people recommending to add either "Java EE 7 API Library" or "Java EE Web 7 API Library" to the compile-time class-path as a CDI dependency (these libraries

Different applications writing to same log4j log file

流过昼夜 提交于 2020-01-03 19:05:10
问题 I have 4 java/Java EE applications- Two are server based j2ee applications running in WebSphere. Other two are standalone java applications. My logging framework is log4j using log4j.properties. Question 1: Can I have a same log file for logging from all the applications. Will it cause any file writing issues even if all the applications are writing at the same time? Question 2: If all the applications can write without any issues, how can I pre-append the application name to each of the log