alihosseini1365 Posted November 12, 2014 Share Posted November 12, 2014 Hi I want to spray through The form remote connection to a remote JB show. What should I do? this part of the project. and This class is calling the database table values. package currencyJspClient; import ir.jnf.currency.model.currencylog.CurrencyLog;import ir.jnf.currency.service.currencylog.CurrencyLogServiceRemote; import java.util.ArrayList;import java.util.List;import java.util.Properties; import javax.naming.Context;import javax.naming.InitialContext; public List<CurrencyLog> farakh() { try { Properties properties = new Properties(); properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); Context context = new InitialContext(properties); String name = "ejb:currency-ear/currency-ejb/CurrencyLogService!ir.jnf.currency.service.currencylog.CurrencyLogServiceRemote"; CurrencyLogServiceRemote bean = (CurrencyLogServiceRemote) context .lookup(name); System.out.println(bean.currencyLogFindAllRemote()); currencyList = bean.currencyLogFindAllRemote(); return currencyList; } catch (Exception e) { e.printStackTrace(); } return null; } } [/code] Also, sorry that my English is very beginner's level. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now