java-ee

How to tell eclipse to ignore: “No persistence.xml file found in project”

冷暖自知 提交于 2019-12-20 11:06:31
问题 For my projects Necessity i regroup all the persistence.xml entries in one core project which i bind as maven dependency wherever i need. The problem is that the eclipse IDE is always complaining about No persistence.xml file found in project Is there away to keep eclipse quiet about this? Thanks 回答1: Thanks to sionnach733 who put me on the right way 回答2: Window->Preferences->Java Persistence-> JPA-> Errors/warnings-> Project Then change it from error to whatever you like(warning/info/ignore)

Java EE 6 - Embedded container EJB tests

≡放荡痞女 提交于 2019-12-20 10:57:16
问题 This questiong is regarding Java EE 6 , using glassfish v3 embedded-all . I have a unit test that uses EJBContainer to test my stateless EJB. Problem is I'm having trouble looking up the EJB (remote) using JNDI: setup() { ctx = EJBContainer.createEJBContainer().getContext(); } ... test() { BookService bookService = (BookService)ctx.lookup("java:global/BookServiceEJB!com.something.service.BookService"); ... } @Stateless public class BookServiceEJB implements BookService { ... } @Remote public

Explicite Local EJB not injected with Arquillian

a 夏天 提交于 2019-12-20 10:44:57
问题 I use Arquillian to test an stateless session bean that has an explicit local and remote interface. But in the test Arquillian does not "inject" anything in a field that has the type of the local interface, but it works for the remote interface. @Stateless public class TestServiceImpl implements TestServiceLocal, TestServiceRemote { public String greet() { return "hallo"; } } The remote interface: @Remote public interface TestServiceRemote { public String greet(); } The locale interface:

Which is easier to extend, Alfresco or Nuxeo? [closed]

一个人想着一个人 提交于 2019-12-20 10:44:41
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . I am considering doing a rewrite of an open source project from LAMP to J2EE and integrating it with an enterprise oriented CMS as the GUI. The two most viable OSS ECM J2EE CMS platforms that I have run across are Alfresco and Nuxeo. I need to get into some deep integration

Eclipse reports error on my JPA project

我们两清 提交于 2019-12-20 10:37:05
问题 Each time I make a JPA project Eclipse reports that there are errors in my project but I do not understand why it does so. I added image and errors below: Description Resource Path Location Type Column "id" cannot be resolved on table "page" Page.java /BreakpointJPA/src/no/breakpoint/domain line 14 JPA Problem Description Resource Path Location Type Column "title" cannot be resolved on table "page" Page.java /BreakpointJPA/src/no/breakpoint/domain line 18 JPA Problem Description Resource Path

REST - How to restrict access for not authorized client software

六月ゝ 毕业季﹏ 提交于 2019-12-20 10:23:34
问题 here is the challenge: The service-/business layer has a REST (JSON) interface. There are two kinds of clients which can call the API: The webapp, which is running in a browser and a mobile-app (Android). Both of them are public. Everyone who uses the authorized (!) webapp or the authorized (!) mobile-app should have access to the resources. All unauthorized clients (scripts, for instance) should be prohibited. Note: There are no limitations how many or which users have access to the service

Beginning Java EE

醉酒当歌 提交于 2019-12-20 10:11:33
问题 I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server. Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc. Also which is the best application server to use (on Linux)? 回答1: "what java enterprise applications are, how they are different from normal java classes etc" Well they are normal classes. They are ran by an

Selenium + JUnit: test order/flow?

社会主义新天地 提交于 2019-12-20 09:59:26
问题 I am using Selenium to test my java web app's html pages (JSPs actually). My web app requires a flow to access each pages (it is a small online game web app), as in: to get to page B you'd need to go to page A, enter some text and press a button to get to page B. Obviously I already have some tests to verify that page A is working properly. I would like to be able to write more tests in order to check that after the tests for page A run I'll get my tests for page B running (and so on for the

Spring Security user account registration, creation and management

北慕城南 提交于 2019-12-20 09:54:20
问题 I've been looking into using Spring Security for the authentication/authorization of my web application (this will be JDBC based). However, a core component seems to be left out from my perspective. How do I register/create new users? Is there an out of the box API for that? Do i need to write user registration and management from scratch? Things i need to do include: - Registering a new user - Resetting passwords - Emailing a user to activate their account - Emailing a user to reset their

Default EJB transaction mode for asynchronous methods?

故事扮演 提交于 2019-12-20 09:30:45
问题 When I have an @Asynchronous method in an EJB, and I don't specify the @TransactionAttribute , then how exactly does the container handle the transaction boundaries? Obviously, it can't use the calling thread's transaction, so what does it do? Same question, but regarding methods that are triggered by the TimerService. EDIT: I think I phrased that poorly. I already know that the default mode is 'REQUIRED'. So it should be safe to assume that those methods will always be called within a