简体   繁体   中英

EJB 3.1 How to block external connection

I have a Stateless bean where I want to allow access only to the client that I authorize.

The bean:

@Stateless 
public class LibraryBean implements LibraryIFace { 

   @Override 
   public void setName(String name){ 
  sb.setName( name ); 
   } 

   @Override 
   public String getName(){ 
   return sb.getName(); 
   } 

   @EJB 
   private SingIFace sb; 

}

I know that anyone can access to this bean over the network.

How can I block all connections not trusted?

I using Wildfly.

Thanks in advance Andrea.

Check out the chapter Securing EJBs from the Wildfly documentation. It should help you to adjust access to your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM