glassfish-3

Where can I configure the thread pool behind the @Asynchronous calls in Java EE 6?

笑着哭i 提交于 2019-12-02 23:53:31
I recently learned that I can easily make any session bean method Asynchronous by simply adding the @Asynchronous annotation. E.g. @Asynchronous public Future<String> processPayment(Order order) throws PaymentException { ... } I know that Java EE 7 added Concurrency Utilities , but in Java EE 6, where is the thread pool configuration of the @Asyncronous methods? is there a way to set a timeout? is it a fixed thread pool? a cached one? what is it's priority? Is it configurable somewhere in the container? I think timeout could be achieved by invoking Future.cancel(boolean) from a method

Programmatically add roles after authentication

情到浓时终转凉″ 提交于 2019-12-02 21:20:02
I have the following JSF 2.1 login form, running in Glassfish 3.1 <h:form id="loginForm"> <h:panelGrid columns="2" cellspacing="5"> <h:outputText value="Username" /> <h:inputText value="#{loginHandler.username}" /> <h:outputText value="Password:" /> <h:inputText value="#{loginHandler.password}" /> <h:outputLabel value="" /> <h:commandButton value="Login" action="#{loginHandler.login}" /> </h:panelGrid> </h:form> And the following backing bean. public String login() throws IOException, LoginException { log.debug("Trying to login with username " + username); HttpSession session = getRequest()

unable to redeploy web application on glassfish3

妖精的绣舞 提交于 2019-12-02 18:24:35
问题 I m trying to deploy a web application using netbeans to glassfish 3.01 but i m not able to do so Glassfish says Inconsistent Module State the web app has some jars and a ejb jar for a local ejb 回答1: Open the domain.xml file that you will find in this folder: "your glassfish installation"/domains/"your domain"/config In this file look for your application deployment configuration to manually remove it: 1) Remove the web-module tag <applications> ... <web-module availability-enabled="false"

Facelet Tag Library mechanism does not work as expected

南楼画角 提交于 2019-12-02 12:56:29
问题 I'm unable to pack taglibrary in a war file. I moved tags from project to extra library the current project is depending now. I put the taglibrary file into the META-INF directory of the jar containing tags (how is described here). But the page does not work: Expression Error: Named Object: eu.barbucha.barbatag.simple.PropertyTag not found. The server is able to find the taglibrary. Otherwise the page works, just one waring appears: Warning: This page calls for XML namespace http://barbucha

Where does the Liferay portal-ext.properties go?

蓝咒 提交于 2019-12-02 07:48:32
问题 Below is my folder hierarchy. Where does the portal-ext.properties go? C:\glassfish3\glassfish\domains\domain1\applications\liferay Thanks! 回答1: You can put it in WEB-INF/classes folder of your liferay application. Probably C:\glassfish3\glassfish\domains\domain1\applications\liferay\WEB-INF\classes. 回答2: If you want a more clean location you can put it into the main folder of liferay. e.g.: * C:\liferay-portal-6.1.1-ce-ga2* 来源: https://stackoverflow.com/questions/7490877/where-does-the

How to add richfaces to maven project

独自空忆成欢 提交于 2019-12-02 07:17:01
I'm trying to use popup component in my app. I use JSF, Glassfish. Here's my pom.xml : <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pl.karta</groupId> <artifactId>epacjent</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <name>epacjent</name> <properties> <org.richfaces.bom.version>4.2.2.Final</org.richfaces.bom.version> <gae.version>1.4.2</gae.version> </properties>

jax-rs jersey: Exception Mapping for Enum bound FormParam

南笙酒味 提交于 2019-12-01 23:25:01
问题 I am building a REST application, which is running on Glassfish 3, and having trouble handling the case when a parameter is bound to an enum: @FormParam("state") final State state So, State is just an enum, which contains different types of states. In case a value is submitted, that can not be parsed, a http 400 is returned. This basically is fine. However, I need to intercept that exception and return a custom response, which provides additional information to the client. (e.g. a json object

Target Unreachable, identifier resolved to null

社会主义新天地 提交于 2019-12-01 22:00:56
问题 I'm trying to run j2EE project on external server. Project was made in NetBeans (6.7.1) and when I run it from there, everything's going fine (I run it on GlassFish v3 server). But when I run GlassFish from asadmin script and give him my project's war file, it returns exception: Exception Details: javax.el.PropertyNotFoundException Target Unreachable, identifier 'loginBean' resolved to null I was searching for answer and nothing helped me. Is there something I miss that Netbeans place in

Table/View 'EJB__TIMER__TBL' does not exist

亡梦爱人 提交于 2019-12-01 21:53:12
I have an application that runs on Glassfish 3.0.1. I've already successfully installed it on a few instances, but now I'm trying to set up a new server. Looking at the log, the deployment goes fine at first, but then I get this: [#|2010-12-06T17:53:38.020+0000|WARNING|glassfish3.0.1|org.eclipse.persistence.session.file:/opt/sun/glassfish/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App|_ThreadID=31;_ThreadName=Thread-1;| Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse

Can a stateless session bean have protected final method?

佐手、 提交于 2019-12-01 20:52:12
I have defined a session bean base class. This class is abstract and contains protected final methods. A session implementation class extends the abstract class and defines additional methods. During deployment, Glassfish 3.1.2 server generates an exception stating that method is overridden. abstract class AbstractSessionBean { @PersistenceContext(unitName="primary") private EntityManager em; protected final EntityManager getEntityManager() { return em; } } @Startup @Stateless class RegistrationSessionBean extends AbstractSessionBean { public void loadRegistration() { ... } } During deployment