Advertisement
Guest User

Untitled

a guest
Apr 6th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public static void main(String[] args) throws Exception {
  2. Properties prop = new Properties();
  3. prop.setProperty("java.naming.factory.initial", "oracle.jms.AQjmsInitialContextFactory");
  4. prop.setProperty("db_url", "jdbc:oracle:thin:<connectionurl>");
  5. prop.setProperty("java.naming.security.principal", "<username>");
  6. prop.setProperty("java.naming.security.credentials", "<password>");
  7. Context ctx = new InitialContext(prop);
  8. QueueConnectionFactory qcf = (QueueConnectionFactory) ctx.lookup("<Queuename>");
  9. System.out.println(":: Queue :: "+qcf);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement