I have this code:
@PersistenceContext(name="persistence/monkey", unitName="deltaflow-pu")
...
@Stateless
public class GahBean implements GahRemote {
But when I use this:
try{
InitialContext ic = new InitialContext();
System.out.println("Pissing me off * " + ic.lookup("java:comp/env/persistent/monkey"));
Iterator e = ic.getEnvironment().values().iterator();
while ( e.hasNext() )
System.out.println("rem - " + e.next());
}catch(Exception a){ a.printStackTrace();}
I get this exception:
javax.naming.NameNotFoundException: No object bound to name java:comp/env/persistent/monkey
If I remove the lookup the iterator doesn't have anything close to it either. What could be the problem?