What kind of client? Remote or inside the server? EJB2 or EJB3?
Simple Remote access:
TopicConnectionFactory qcf = (TopicConnectionFactory) initialContext.lookup("ConnectionFactory");
TopicConnection conn = qcf.createTopicConnection();
Topic csTopic = (Topic) initialContext.lookup("topic/MyTopic");
The env looks like:
env.put("java.naming.factory.initial", "org.jboss.naming.NamingContextFactory");
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
env.put("java.naming.provider.url", "jnp://localhost:1099");