ejb

User context for @Startup EJB on websphere

♀尐吖头ヾ 提交于 2020-01-05 18:10:12
问题 Where do I set the user context Websphere uses when it calls a @Startup EJB? I have a Java EE application with a startup EJB, and I know that it sets a user when calling the EJB, since the call fails due to missing roles. However, I couldn't find where to set the user. 回答1: The EJB spec states that session bean @PostConstruct methods are called in an unspecified security context, and WebSphere does not document a specific security context or allow it to be configured. In practice, singleton

User context for @Startup EJB on websphere

强颜欢笑 提交于 2020-01-05 18:09:56
问题 Where do I set the user context Websphere uses when it calls a @Startup EJB? I have a Java EE application with a startup EJB, and I know that it sets a user when calling the EJB, since the call fails due to missing roles. However, I couldn't find where to set the user. 回答1: The EJB spec states that session bean @PostConstruct methods are called in an unspecified security context, and WebSphere does not document a specific security context or allow it to be configured. In practice, singleton

Using GlassFish v3, EJB and SOAPUI

不羁岁月 提交于 2020-01-05 12:14:00
问题 I would like to create a web service. I am using Glassfish v3, an Eclipse Dynamic Web Project, and SOAPUI to test. I have the following code in eclipse: Class MyLogin package packageTest; import java.io.IOException; import javax.jws.WebMethod; import javax.jws.WebService; @WebService public class MyLogin { @WebMethod public AuthInfo login(@WebParam(name = "email") String email,@WebParam(name = "password")String password) throws IOException, CustomException { if(email == null || email.isEmpty(

Using GlassFish v3, EJB and SOAPUI

 ̄綄美尐妖づ 提交于 2020-01-05 12:13:32
问题 I would like to create a web service. I am using Glassfish v3, an Eclipse Dynamic Web Project, and SOAPUI to test. I have the following code in eclipse: Class MyLogin package packageTest; import java.io.IOException; import javax.jws.WebMethod; import javax.jws.WebService; @WebService public class MyLogin { @WebMethod public AuthInfo login(@WebParam(name = "email") String email,@WebParam(name = "password")String password) throws IOException, CustomException { if(email == null || email.isEmpty(

How to get Container Managed Transactions (CMT) working with EJB 3.1, Hibernate 3.6, JPA 2.0 , JBoss and MySQL

狂风中的少年 提交于 2020-01-05 07:37:12
问题 I was trying to get CMT working with JPA EntityManagers and EJBs, but came up with the error below. (stack trance truncated): Caused by: java.lang.RuntimeException: **Could not resolve @EJB reference: [EJB Reference: beanInterface 'com.mydomain.beans.TestBean2', beanName 'testBean2', mappedName 'null', lookupName 'null',** owning unit 'AbstractVFSDeploymentContext@2008455195{vfs:///Users/willtardy/Documents/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime

EJB 3.0 Timer Cluster Info

我的梦境 提交于 2020-01-05 07:25:11
问题 I was able to get some hands on EJB3.0 Timer Service.I was able to get the timeout working and I was able to invoke the timer using servlet Context listener.I have deployed a simple app which sends alerts at a specific interval.I am using WL 10.3.1(does not support EJB3.1,to use Scheduler). I get alerts twice at the same time.(I have a cluster with 2 managed Servers).I looked at few examples of using a timer in WL cluster,for eg: http://shaoxiongyang.blogspot.com/2010/10/how-to-use-ejb-3

How to invoke a stateless bean method if it is not declared in business interface

谁说胖子不能爱 提交于 2020-01-05 07:13:00
问题 I faced with a problem I can't invoke a method of a bean instance once it isn't declared in the business interface. Basically the problem came to me after I started working with a EJB 2.1 project had been developed by another team. The app server is Websphere v8 The problem is following: We have an abstract class FooAbstract where basic business functions are declared (like read, delete, update, etc.) Each bean must extend that class and implement abstract methods of course. Beans can have

How to resolve 'Api type [java.util.Set] is not found with the qualifiers' Error when starting TomEE 1.6.0 plus?

自闭症网瘾萝莉.ら 提交于 2020-01-05 03:07:50
问题 Following on from this question TomEE on eclipse, How to call a remote EJB from a JSF Managed bean? I get the following error when I try to start the TomEE 1.6.0 plus server. What should i do? I have searched on the internet and found that this is because of Google Guava 15.0 While I understand what they are talking about I don't know how I can apply the solution to TomEE. The link explains that this error should go away by using open web 1.2.1. I can see that TomEE already uses open web 1.2

How to resolve 'Api type [java.util.Set] is not found with the qualifiers' Error when starting TomEE 1.6.0 plus?

守給你的承諾、 提交于 2020-01-05 03:07:17
问题 Following on from this question TomEE on eclipse, How to call a remote EJB from a JSF Managed bean? I get the following error when I try to start the TomEE 1.6.0 plus server. What should i do? I have searched on the internet and found that this is because of Google Guava 15.0 While I understand what they are talking about I don't know how I can apply the solution to TomEE. The link explains that this error should go away by using open web 1.2.1. I can see that TomEE already uses open web 1.2

How to dynamically load server configurations depending on server/environment?

此生再无相见时 提交于 2020-01-04 14:31:39
问题 Currently I setup maven profiles to be able to deploy my project for different environments (dev, demo, staging, production, ...) and it works perfectly fine. But the issue is that for each module (web application) that I have, I need to copy/paste this configuration files ( they are all property files). This will be an overhead when I need to change an environment/server configuration (for example when a port number changes I need to redeploy all my EAR files). My question is, is there any