jakarta-ee

Avoid Going on back page after Logout in JSF application

喜夏-厌秋 提交于 2020-01-16 18:24:23
问题 I am disabling the user to go back on the previous page after he has logged out. Controls comes in the filter but the page are still there in cache. I have used the filter suggested in this answer : BalusC Answer My filter looks like : @WebFilter public class NoCacheFilter implements Filter { @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletResponse response = (HttpServletResponse) res; System.err

JBoss 7 Classloader — Exclude Module Implementation

我怕爱的太早我们不能终老 提交于 2020-01-16 18:05:43
问题 I have a simple piece of code instantiating a JBoss Hot Rod client and this is deployed in an .ear file on Jboss 7 System.out.println("Attempting to RemoteCacheManager at: "+ipAddress); Configuration conf = new ConfigurationBuilder().addServer().host(ipAddress).port(11222).build(); RemoteCacheManager manager = new RemoteCacheManager(conf); RemoteCache defaultCache = manager.getCache(); System.out.println("SUCCESS OUT: Connected to RemoteCacheManager at: "+ipAddress); logger.info("SUCCESS:

sharing java objects between applications

故事扮演 提交于 2020-01-16 08:49:14
问题 I want to write an application that when deployed on a server discovers some classes on that server and their methods and exposé a list of it to a client (via web service, servlet or RMI). the client can then choose a method and activate it (with reflection). Problem is that my application is not in the same context of the other applications on the server so I can't activate their methods (I don't have access to their classloader). I have a few ideas but not sure if they are feasible: Create

Accessing the Database via JPA with the Enduser's Credentials in Java EE

蓝咒 提交于 2020-01-16 08:49:13
问题 I am working on a JavaEE project with WildFly , Hibernate ( JPA ), C3P0 and a MS SQL Server database. The database is a legacy database with more than a thousand Database Objects like Stored Procedures , Functions , Views , Triggers and so on. All these database Objects have fine grained Permissions set on User Role level. Now I need to access this database with a JavaEE Web Application. My Problem is, that the usual JPA configuration let me set only one Username/Password for the Database in

JavaScript force an OnChange in Maximo

天大地大妈咪最大 提交于 2020-01-15 23:02:20
问题 I'm currently working on a Bookmarklet for Maximo, which is a Java EE application, and I need to populate a few input boxes. Generally when a use inputs data into the box they click a button that gives them a popup and they search for the value to be added to the script. Or they can type the name and hit tab/enter and it turns it to capital letters and does a few things in the background (not sure what it does exactly). I currently use Javascript: $('mx1354').value = "KHBRARR"; $('mx1354').ov

What data structure to use with a java jdbc resultset. What is the defacto standard in handeling jdbc records in java?

我与影子孤独终老i 提交于 2020-01-15 15:34:25
问题 Learning java. When I make a jdbc call with a query in java, how can I store that record. I have seen them being stored in hash collections by more advanced coders but I am not sure how to use the java collections framework to store records and iterate through them. Does anyone have a simple code example they can share and explain for storing records of resultset like a hashmap? Thank you in advance. sorry for the noob question. 回答1: If you are using a framework, then you have to play by the

Bug in GlassFish 4 or Tyrus: Decoder#willDecode is called twice for each ByteBuffer?

…衆ロ難τιáo~ 提交于 2020-01-15 12:25:09
问题 I wrote the most simple application that uses WebSockets. My back end is GlassFish 4 build 89, my front end is a JavaFX 2.2 application client that uses Tyrus 1.0 RC3, the reference implementation of Java API for WebSockets. GlassFish uses Tyrus too although I've been to lazy to lookup exactly what version is included in GlassFish build 89. My test of the WebSocket API sent a java.util.Date back and forth, nothing more. Well, as a binary object should be added. So I wrote my own Decoder that

IllegalArgumentException: Invalid ejb jar [HelloEJB]: it contains zero ejb.

早过忘川 提交于 2020-01-15 11:25:14
问题 While the previous sample client from the Creating and Running an Application Client on the GlassFish Server tutorial runs correctly, I'm going through the process again to clarify the procedures for better understanding. Specifically, to manually deploy the bean to Glassfish from the CLI rather than from the IDE. The session bean is @stateless and implements @remote . This version of Glassfish shipped with Netbeans. The bean is an "EJB module" with the library API HelloLibrary included as a

IllegalArgumentException: Invalid ejb jar [HelloEJB]: it contains zero ejb.

巧了我就是萌 提交于 2020-01-15 11:25:09
问题 While the previous sample client from the Creating and Running an Application Client on the GlassFish Server tutorial runs correctly, I'm going through the process again to clarify the procedures for better understanding. Specifically, to manually deploy the bean to Glassfish from the CLI rather than from the IDE. The session bean is @stateless and implements @remote . This version of Glassfish shipped with Netbeans. The bean is an "EJB module" with the library API HelloLibrary included as a

JPA - No Persistence provider for EntityManager named {{NAME_HERE}}

你。 提交于 2020-01-15 10:20:47
问题 I was about to create a backend for a new app and I got stuck at configuring JPA . I'm using GlassFish 5.0.0 and Hibernate 5.4.5.Final with MySQL . The error I get is: javax.servlet.ServletException: javax.persistence.PersistenceException: No Persistence provider for EntityManager named applicationDB persistance.xml : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi