glassfish-embedded

Can't execute embedded Glassfish App at Apple platform

岁酱吖の 提交于 2019-12-11 09:42:30
问题 I'm having a problem running an JEE5 application at GF 3.1 Embedded at Apple computers... (the same environment works at Linux and Windows). The server starts ok, but when loading the APP the server returns a SEVERE message... My deployment is basically the glassfish-embedded-web-3.1.jar file, the configured domain with app inside, and a start class. The output can be seen here: http://pastebin.com/ypeV3jm3; and the lines 44 and 48 show the error messages. At linux/windows platform (where it

Is it possible to deploy an application with WildFly as a bundle?

浪子不回头ぞ 提交于 2019-12-11 08:07:25
问题 Is it possible to deploy an application with WildFly as a bundle? I am able to do this with embedded Glassfish. 回答1: If you want to embed JBoss/Wildfly with your app, you should review Wildfly Swarm. That's a way to generate an application that contains the server embedded. It's very similar to Spring Boot, but you can use Java EE APIs. 回答2: As you can see in JBoss documentation there has been something for OSGi, rather than there is... To me it looks like this has died before wildfly was

Embedded Glassfish v3: deploying sun-resources.xml programmatically fails

ⅰ亾dé卋堺 提交于 2019-12-11 07:26:07
问题 I would like to be able to package my jpa-ejb-web project as a standalone application, by using Glassfish embedded API. To use the JPA layer, I need to deploy the sun-resource.xml configuration, which should be possible with the asadmin command add-resources path\to\sun-resources.xml . I've this code to do it: String command = "add-resources"; ParameterMap params = new ParameterMap(); params.add("", "...\sun-resources.xml" ); CommandRunner runner = server.getHabitat().getComponent

ProgrammaticLogin doesnt work in arquillian tests

六眼飞鱼酱① 提交于 2019-12-10 21:39:05
问题 I'm trying to simulate a login using the ProgrammaticLogin class in my arquillian tests in an embedded glassfish. my code is the following: System.setProperty("java.security.auth.login.config","path/login.config") com.sun.appserv.security.ProgrammaticLogin loginP = new ProgrammaticLogin(); try{ loginP.login("user1","password","fileRealm",true); } catch (Exception e){ System.out.println(e.getMessage()); } i'm getting the following exception: SEVERE: SEC9050: Programmatic login failed com.sun

JSP hot-swap in Maven glassfish embedded plugin

妖精的绣舞 提交于 2019-12-06 04:49:45
问题 I am trying to setup embedded glassfish maven plugin and I succeeded, but I can't make jsp files to be hot-swapped. Here is my config: <plugin> <groupId>org.glassfish</groupId> <artifactId>maven-embedded-glassfish-plugin</artifactId> <version>3.0.1</version> <configuration> <instanceRoot>${project.build.directory}</instanceRoot> <goalPrefix>embedded-glassfish</goalPrefix> <app>target/myapp.war</app> <port>8080</port> <contextRoot>myapp</contextRoot> <autoDelete>true</autoDelete> <

Java EE 6 embedded glassfish embedded derby EJB unit test

泄露秘密 提交于 2019-12-04 14:40:53
问题 questing is about javaee6 with embedded glassfish and embedded derby jndi lookup for data source at the time of deployment before unit test is executed.... Please find the persistence.xml here... <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> <persistence

JSP hot-swap in Maven glassfish embedded plugin

纵然是瞬间 提交于 2019-12-04 10:46:41
I am trying to setup embedded glassfish maven plugin and I succeeded, but I can't make jsp files to be hot-swapped. Here is my config: <plugin> <groupId>org.glassfish</groupId> <artifactId>maven-embedded-glassfish-plugin</artifactId> <version>3.0.1</version> <configuration> <instanceRoot>${project.build.directory}</instanceRoot> <goalPrefix>embedded-glassfish</goalPrefix> <app>target/myapp.war</app> <port>8080</port> <contextRoot>myapp</contextRoot> <autoDelete>true</autoDelete> </configuration> </plugin> Any clues? Resurrection for further reference. I managed to do that by deploying an

Java EE 6 embedded glassfish embedded derby EJB unit test

六月ゝ 毕业季﹏ 提交于 2019-12-03 09:13:23
questing is about javaee6 with embedded glassfish and embedded derby jndi lookup for data source at the time of deployment before unit test is executed.... Please find the persistence.xml here... <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> <persistence-unit name="mymodulePU" transaction-type="JTA"> <provider>org.eclipse.persistence.jpa.PersistenceProvider

Java EE 6 - Embedded container EJB tests

穿精又带淫゛_ 提交于 2019-12-03 00:46:50
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 interface BookService { ... } gives the exception: javax.naming.NamingException: Lookup failed for

Embedded Glassfish, security and Arquillian questions

落爺英雄遲暮 提交于 2019-11-30 12:14:48
问题 I want to test my EJBs on an embedded Glassfish using Arquillian. The important thing is that I have to have security up because my bean logic does some programmatic security checking ( sessionContext.isCallerInRole(role) ). Is it possible to simulate a login with Arquillian on an Embedded Glassfish? How do I setup the Embedded Glassfish to use user and role property files? [EDIT] I found a post who's directions I decided to follow (http://community.jboss.org/message/580290) but I still got