java-ee

Where to find all the MaxPermSize in Eclipse-WildFly system?

不打扰是莪最后的温柔 提交于 2019-12-13 02:30:50
问题 Where are all the places on my system MaxPermSize might get set? I'm using Eclipse 4.4, WildFly and jdk 1.8. I get this warning every time I stop WildFly: Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 I want to make it go away by replacing all the MaxPermSize by MaxMetaspaceSize. Thanks for the help. 回答1: Go to Run -> Run Configurations in the main file menu. Find the specific instance you are trying to run. The layout of this configuration

Spring annotation cache: CacheDecoratorFactory not configured for defaultCache

自古美人都是妖i 提交于 2019-12-13 02:23:52
问题 I'm trying to use Sping Annotation cache with EhCache. So, for first, I added the dependency to my pom.xml and configured the application-context.xml as: <ehcache:annotation-driven cache-manager="cacheManager" /> <ehcache:config cache-manager="cacheManager"> <ehcache:evict-expired-elements interval="60" /> </ehcache:config> <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> <property name="configLocation" value="ehcache.xml"/> </bean> This is the

how to get JSON representation of Java Objects in JAX-RS layer in java EE 7?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 02:23:22
问题 We are currently using Java EE 5 and we do something like the following for turning POJO into JSON before sending the response. @GET @Path("/books") @Produces(MediaType.APPLICATION_JSON) public Response getBooks() { List<Book> listOfBooks = getMiscService().getbooks(); String response = "{\"books\":" + gson.toJson(listOfBooks) + "}"; return Response.status(Response.Status.OK).entity(response).build(); } we are using gson API of google. Now that we are restructuring the code to Java EE 7 API

Glassfish Security: Role changes should take effect immediately

时间秒杀一切 提交于 2019-12-13 02:21:36
问题 I'm using a JDBC realm for authentication and authorization. When I remove a role from a user in the DB, the changes are not reflected immediately in the application, only at the next user login. Is it possible that role changes take effect immediately? I know I have to put this logic in the application itself, but I don't know how to apply this changes to a specific user while he's logged in. I'm using GF 3.1. 回答1: There are no API-provided ways for this. Your best bet is to wrap the logged

Where are Websphere AS transaction manager logs?

时间秒杀一切 提交于 2019-12-13 01:55:21
问题 Does Websphere Application Server (7.0, preferably) have a log for transaction manager? I'd like to see how and when transactions are started for my application's threads, whether and when they commit or rollback, etc. 回答1: I would suggest to set logging for the package com.ibm.wsspi.uow (maybe com.ibm.websphere.uow and com.ibm.websphere.jtaextensions too) to FINEST (somewhere in your WebSphere administrative console). This should give you plenty information about what's going on. Maybe the

How to disable default servlet container session?

不打扰是莪最后的温柔 提交于 2019-12-13 01:47:14
问题 In J2EE web application, how do I disable the default HttpSession creation? We have our own way of tracking session, we don't use default jsp/servlet session but the default session sets cookie in browser which I would like to avoid. Right now on every JSP page we specify as session="false" in page directive but often some developers missing this part, so I am trying to find a common place where I can control default session. 回答1: I am trying to find a common place where I can control default

Spring MVC ResourceBundleMessageSource XML configuration

两盒软妹~` 提交于 2019-12-13 01:37:57
问题 I would like to mimic the Grails way of resolving i18n messages. In WEB-INF/i18n/ I have the following directories: admin /messages_EN.properties admin /messages_FR.properties website /messages_EN.properties website /messages_FR.properties please ignore the language endings ( EN and FR ) in this example in my xml configuration I currently have: <!-- Register the welcome.properties --> <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">

Can't deploy Java EE Application to Wildfly

左心房为你撑大大i 提交于 2019-12-13 01:31:48
问题 im trying to migrate from Glassfish AS to WildFly AS. After I created the JDBC Datasource in Wildfly and changed the persistnce.xml accordingly i get this error on deploy: server.log: 2014-04-10 10:34:26,496 INFO [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.2.0.Final 2014-04-10 10:34:26,552 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 2014-04-10

Best structure for connection pooling with Java EE

十年热恋 提交于 2019-12-13 01:25:33
问题 I am trying to figure out the best structure for connection pools so that I can access the connection pool from any servlet and establish a connection to my database. I have been following some tutorials in setting up and configuring the datasource and connection pool and they all have them initialized and accessed in classes that extend HttpServlet. So it looks something like this: public class DatabaseConnector extends HttpServlet { private static final long serialVersionUID = 1L; private

Error deploying ear to Glassfish

ぐ巨炮叔叔 提交于 2019-12-13 01:25:26
问题 We have a EAR with 3 EJB modules. I am trying to deploy to glassfish but am hitting an error I can't explain or work out how best to identify. [#|2010-08-03T14:39:15.570+0100|INFO|glassfish3.0.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=28;_ThreadName=Thread-1;|[AutoDeploy] Selecting file /export/home/myapp/apps/domains/myapp/autodeploy/App-ear.ear for autodeployment.|#] [#|2010-08-03T14:39:18.654+0100|WARNING|glassfish3.0.1|javax.enterprise.system