java-ee

Building/deploying a EJB .jar with its dependencies

混江龙づ霸主 提交于 2019-12-12 11:27:56
问题 I am new to Java EE. I use Maven, Eclipse and jBoss/WildFly. I have a war project. When I build the project all its dependencies are packaged inside the war file in WEB-INF/lib . Now I am trying to create a ejb project (I have <packaging>ejb</packaging> in the pom.xml ). I want to deploy it as a separate project (not as a part of the war ). When I build the ejb project Maven does not package any dependencies in the jar . How can I package/deploy a ejb .jar with its dependencies ? UPDATE: I'd

Can anybody explain these words.Presentation Tier .Business Tier .Integration Tier in java EE with example?

纵饮孤独 提交于 2019-12-12 11:23:06
问题 What are these in Java EE .Presentation Tier .Business Tier .Integration Tier I like to know what are these patterns with example 回答1: Presentation tier: what the users see, typically a web application. Business tier: where all the logic for your application is performed. Integration tier: what connects the system to other systems (through database connections, JMS, web services, etc). 回答2: Mulit-tier architecture, or n-tier architecture, is an architecture style in which the different

Session timeout in Java EE

有些话、适合烂在心里 提交于 2019-12-12 11:21:04
问题 In which ways the time for session timeout can be defined in Java EE? I am looking beyond obvious ways, such as setting session timeout in web.xml or HttpSession.setMaxInactiveInterval(). I am currently reviewing a Java EE application, but I can't find anything related to session timeout definition. The web app is in Weblogic. I am assuming that since there is no session timeout definition, the session will never expire. 回答1: As you're looking for how the session can be timed out in Weblogic,

IntelliJ IDEA Remote JSP Debugging?

▼魔方 西西 提交于 2019-12-12 11:07:30
问题 I'm using IntelliJ IDEA 11.1.1 and I'm trying to figure out how to remotely debug JSPs on a JBOSS 4.01 server. I can successfully remotely debug servlets but I can't get JSPs to debug. JBOSS is running with the following JAVA_OPTS : -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n I'm new to the IntelliJ IDEA world so any advice would be appreciated. 回答1: I've tried it with JBoss 5.1.0 and it works fine, make sure you have artifacts configured for deployment, I used the

Migrate data from relational DB to NoSQL

南笙酒味 提交于 2019-12-12 11:05:39
问题 Is it possible/are there tools/ best practices etc to migrate data to a NoSQL format from a relational DB. I have a JEE6 app making use of Hibernate ORM to persist to MySQL but now we wish to move to NoSQL solution but need to bring the existing data with us Thanks W 回答1: There are some tools to help the migration, but in the end, MySQL is a relational database which has a completely different structure from noSQL databases. In the end, you will almost always have to do these four steps

Accessing transaction status in container managed beans

孤街浪徒 提交于 2019-12-12 10:59:59
问题 I have a @Stateless EJB using container managed transaction. Is there a way to access the "status" of javax.transaction.UserTransaction ? That is, calling UserTransaction.getStatus() inside the bean methods? I know access to UserTransaction is prohibited in container managed beans, but I would like to know, is there any other way to get access to getStatus() method? 回答1: I don't think you've understood the responsibility of the UserTransaction class. It does not exist to provide you with

Derby Pool ping fails with java.net.ConnectException in Glassfish

浪尽此生 提交于 2019-12-12 10:53:43
问题 I`m just installed a Glassfish 4.1 on Ubuntu 14.04 and trying to ping DerbyPool but it fails with java.net.ConnectException. Ping Connection Pool failed for DerbyPool. Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused. Please check the server.log for more details. server.log: [2015-01-02T20:51:12.361+0200] [glassfish 4.1] [WARNING] [test.connection.pool.failed] [javax.enterprise.resource

SQL Server JDBC Exception

99封情书 提交于 2019-12-12 10:51:29
问题 When using ANT to build my Java application I keep getting this error. I have tried multiple times to use SQLJDBC.JAR and SQLJDBC4.JAR but continually receive this error message. I am completely stumpped why this error is received even after upgrading to sqljdbc4.jar. [javadoc] java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0. 回答1: Refer to this link:

javax.mail.MessagingException: Could not connect to SMTP host : <host name> port : 25 response: 554

末鹿安然 提交于 2019-12-12 10:46:13
问题 I am trying to send mail using java mail api. My smtp server is an ibm server. I am facing this exception javax.mail.MessagingException: Could not connect to SMTP host : <host name> port : 25 response: 554 pls help me. Thanks in advance. 回答1: You are getting an error code 554: Access Denied Relay . It can be caused because your SMTP server doesn't recognise your petition as legit, and blocks it as if it were SPAM. Perhaps your from account doesn't match the server expected domain, or you need

Issue in getting context path inside jsp?

浪尽此生 提交于 2019-12-12 10:44:10
问题 My jsp lies at below location http://myApp.com/myWebApp/customer/images/customer.jsp My image(accessed thru customer.jsp) lies at http://myApp.com/myWebApp/images/customer.gif In image tag i am making the absoulte path as below src="${param.contextPath}images/customer.gif" just for info i am using param here becoz this is how we access request params in EL. I was expecting that ${param.contextPath} will return /myWebApp/ but it is returning /myWebApp/customer/. Is there a way i can get just