java-ee

JNDI name for EJB 3.1 running on JBoss 7

↘锁芯ラ 提交于 2019-12-12 23:30:13
问题 I'm trying to run this EJB example on JBoss 7 but it always throws NameNotFoundException. The EJB that I try to test is: Calculator. When I deploy it on JBoss 7 show this next lines in the server console: java:global/CalculadoraProject/Calculator!demo.CalculatorRemote java:app/CalculadoraProject/Calculator!demo.CalculatorRemote java:module/Calculator!demo.CalculatorRemote java:jboss/exported/CalculadoraProject/Calculator!demo.CalculatorRemote java:global/CalculadoraProject/Calculator java:app

How to best share entity classes/DAOs across multiple PUs?

戏子无情 提交于 2019-12-12 23:06:56
问题 Let's take a basic example, say we have an entity class @Entity public class User { } and a DAO for dealing with the data: public interface UserDao { @Transactional public void changeUser(User user); } @Repository public class UserDaoImpl implements UserDao { @PersistenceContext private EntityManager em; @Override public void changeUser(User user) { // ... } } We have a main Maven Project that contains plenty other sub-projects, that we use for building multiple application (WARs, JARs etc.).

Class not found: Deploying on Glassfish

三世轮回 提交于 2019-12-12 23:03:41
问题 Below is the error message: SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class test.com.creatop.ateam.facade.TestFacade ] SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class com.creatop.ateam.facade.implementation.PropertyFacade ] SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class com.creatop.ateam.facade.implementation

Using a custom Servlet oriented framework, too many servlets, is this an issue

半腔热情 提交于 2019-12-12 22:33:22
问题 In our application, we structure different web applications by Servlet. There are many, many Servlets and Filters in our applications. We already use different frameworks but not for this particular legacy web application. One issue is that one application/servlet is completely separate from another. If you were to redesign your application that used this legacy design, how would you fix the issue where you have your application broken by too many servlets. I was considering some kind of

push java array in javascript array

寵の児 提交于 2019-12-12 22:30:43
问题 I am getting an array char ab[16][16] through request.getAttribute in ABC.jsp: <% char [][] ab = new char [16][16]; ab = (char [][]) request.getAttribute("grid"); %> <script lang="text/javascript"> var cArr = new Array(16); for(var c=0; c<16; c++) cArr[c] = new Array(16); </script> Is there a way to push values from 'ab' to cArr without doing 256 statements manually? 回答1: <% String[] js = new String[16]; for (int i=0; i<ab.length; i++) { js[i] = "'" + Arrays.toString(ab[i]).replace(", ", "',

After Installing PMD in Luna in Prespective it is Not Showing?

 ̄綄美尐妖づ 提交于 2019-12-12 22:20:02
问题 I installed the Pmd Plugin in Eclipse Luna and in STS , in the installation history it is showing installed but it is not showing in the perspective, so I am not able to run my code through PMD . How can I fix that? 回答1: If installed via the Market place, you then need to enable it for each Project... Then select the ruleset you want to use. The PROBLEMS view will then show the violations. 回答2: I discovered that you need to turn on PMD for each project separately. Which make sense, because

JNDI lookup failing when looking up JMS queue in WebLogic 10.3.5

本小妞迷上赌 提交于 2019-12-12 21:39:06
问题 I'm new to JMS programming and am running into NameNotFoundException, even though, in looking at the Admin Console, it shows the JNDI name that is failing. The exception produced is: javax.naming.NameNotFoundException: Unable to resolve 'tutorialqueue'. Resolved ''; remaining name 'tutorialqueue' at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139) at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252) at weblogic.jndi.internal

glassfish-embedded-maven-plugin - how to deploy resources

筅森魡賤 提交于 2019-12-12 21:35:54
问题 I'm providing a quick and easy way for users to deploy my Java EE 6 application via glassfish-embedded-maven-plugin, so they don't have to install and configure a standalone glassfish. However, I'm running into trouble with resource deployment. The app needs a JavaMail resource from the container, and needs a JAAS realm with a suitable role->user/group mapping. When deploying to a standalone glassfish this is easily provided with a sun-resources.xml file and/or a couple of asadmin commands.

CDI: Injecting single instance works, but injecting Instance<> does not. Why?

不羁的心 提交于 2019-12-12 21:31:12
问题 I'm trying to implement somewhat of a "plugin feature" with the help of CDI injection. But i'm having some trouble and thought i might get some outside perspective from my fellow "Stackers" :-) I got so far that something like this works: @Inject @ScoringModule("AGE") private AgeModule ageModule; @Inject @ScoringModule("CUSTOMER_TYPE") private CustomerTypeModule customerTypeModule; When i "run" this then both fields get injected with the appropriate instances. But when i try to inject them a

Maven structure and Java EE applications

泪湿孤枕 提交于 2019-12-12 21:30:23
问题 How do you organize your Maven modules in a Java EE application? Currently what we do is have the following Maven modules under a parent POM: ear ejb ejb-api core The ejb module contains only EJB classes, while the core module contains all other utility classes, including entities. The ejb-api is a lightweight module that contains local and remote interfaces, for inclusion in separate applications in needed. ear is used to make an EAR package and deploy it to application server. How do you