Hi! I have problems with jndi. I cant get reference to my SLSB:s remote interface with lookup.
The servlet which is using the lookup | | Properties props = new Properties(); | props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); | props.put(Context.PROVIDER_URL, "jnp://localhost:1099"); | props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); | | InitialContext context = new InitialContext(props); | th=(TuoteHallintaRemote)context.lookup("TuoteHallintaRemote.class.getName()"); | | SLSB code: | | @Stateless | public class TuoteHallintaBean implements TuoteHallintaRemote { | | @PersistenceContext(unitName="def") | protected EntityManager em; | | public boolean lisaaTuote(String nimi, Integer hinta) { | | Tuote t = new Tuote(nimi, hinta); | em.persist(t); | return true; | } | | public Collection<Tuote> listaaTuotteet() { | | Query query = em.createQuery("from Tuote t"); | ArrayList al = (ArrayList)query.getResultList(); | return al; | } | | } | | Remote Interface code: | | @Remote | public interface TuoteHallintaRemote { | | public Collection<Tuote> listaaTuotteet(); | public boolean lisaaTuote(String nimi, Integer hinta); | } | | Jboss's log says: 14:42:26,322 INFO [STDOUT] com.hajat.db.TuoteHallintaRemote not bound I can't figure this out! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985129#3985129 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985129 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user