09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}<br />

Hashtable env = new Hashtable(5, 0.75f);<br />

AQxmlDataSource db_drv = null;<br />

try<br />

{<br />

Deploying the AQ XML Servlet<br />

/* Create data source with username, password, sid, host, port */<br />

db_drv = new AQxmlDataSource("AQADM", "AQADM", "test_db",<br />

"sun-248", "5521");<br />

this.setAQDataSource(db_drv);<br />

env.put(Context.INITIAL_CONTEXT_FACTORY,<br />

"com.sun.jndi.ldap.LdapCtxFactory");<br />

env.put(Context.PROVIDER_URL, "ldap://yow:389");<br />

env.put(SEARCHBASE, "cn=server1,cn=dbservers,cn=wei");<br />

env.put(Context.SECURITY_AUTHENTICATION, "simple");<br />

env.put(Context.SECURITY_PRINCIPAL, "cn=orcladmin");<br />

env.put(Context.SECURITY_CREDENTIALS, "welcome");<br />

DirContext inictx = new InitialDirContext(env);<br />

String searchbase = (String)env.get("server_dn");<br />

lctx = (DirContext)inictx.lookup(searchbase);<br />

// Set up LDAP context<br />

setLdapContext(lctx);<br />

// Set the EMAIL server address (if any)<br />

setEmailServerAddr("144.25.186.236");<br />

}<br />

catch (Exception ex)<br />

{<br />

System.err.println("Servlet init exception: " +ex) ;<br />

}<br />

Setup for Receiving AQ XML Requests Using SMTP (E-mail)<br />

You must set up the database, Web server, LDAP server, and e-mail server to receive<br />

AQ XML requests using SMTP.<br />

Database and LDAP Server Setup<br />

To store AQ agents in the LDAP server, the database must be registered to the<br />

LDAP server using the Database Configuration Assistant (DBCA), and the value of<br />

GLOBAL_TOPIC_ENABLED must be set to TRUE (default is FALSE; reset using<br />

alter system set global_topic_enabled=TRUE).<br />

Internet Access to <strong>Advanced</strong> <strong>Queuing</strong> 17-55

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!