JBoss Community

JBoss6 -JNDI - Remoting - SessionScoped

created by Michael Müller in JBoss Remoting Development - View the full discussion

Hello community,


i have some question how i can use RMI and JNDI with SessionScopes?

I get always a error on the client side the weld context is no active: I use JBoss6.


Here my example on Serverside:





public interface ContractRemoteService{

     Set<String> getContracts();





public interface LoginRemoteService{
     public void login(String name)






public class ContractRemoteServiceImpl implements ContractRemoteService{

private UserBean userBean;

public Set<String> getContracts(){
     Set<String> contracts = new HashSet<String>();

     return contracts;





public class LoginRemoteServiceImpl implements LoginRemoteService{

private UserBean user;

     public void login(String name){





public class UserBean{

private String name;

public setName(String name){
     this.name = name;

public String getName(){
     return name;




The client side:



public class Client{

public static void main(String [] args) throws Exceptions{
     Context context = new InitialContext();
     LoginRemoteService loginService = (LoginRemoteService) context.lookup(&amp;quot;LoginRemoteServiceImpl/remote&amp;quot;);
     ContractRemoteService contractService = (ContractRemoteService) context.lookup(&amp;quot;ContractRemoteServiceImpl&amp;quot;);
     contractSerive.getContracts();// autsch



Error Message:


WELD-001303 no active contexts for scope javax.enterprise.context.SessionScoped


How can i activate the Context?


Thanks =)

Reply to this message by going to Community

Start a new discussion in JBoss Remoting Development at Community