📄 setup_steps.txt
字号:
Steps for setting up Internet Access to AQ===========================================1. Setup User Authentication for restricted access Non-authenticated users are not allowed to perform AQ operations. Below are the steps to set up basic authentication in Apache webserver. a. Create users file for two aq agents htpasswd -cd aqpasswd bob welcome htpasswd -d aqpasswd jane welcome b. Change apache configuration to have authenticated access to AQ servlets. i. Add Servlet mount point to jserv.conf ApJservMount /AQServlet /root ii. Add the following to httpds.conf to restrict access to /aqserv/servlet Only the to AQ agents registered in <users>. Replace /apache/htdocs/userdb/users below with the absolute location of <users> file created in step(1) above. <Location /AQServlet/> <Limit POST> AuthName "AQ restrictions for users" AuthType Basic AuthUserFile /apache/AQUsers/aqpasswd require valid-user </Limit> </Location>2. Check if the classpath for the Servlets execution has the classes required AQ Internet operations Add the following to jserv.properties for classpath if they are not already there: wrapper.bin.parameters=-mx256M ; wrapper.classpath=$ORACLE_HOME/rdbms/jlib/aqapi.jar wrapper.classpath=$ORACLE_HOME/rdbms/jlib/jmscommon.jar wrapper.classpath=$ORACLE_HOME/rdbms/jlib/aqxml.jar wrapper.classpath=$ORACLE_HOME/rdbms/jlib/xsu12.jar wrapper.classpath=$ORACLE_HOME/lib/xmlparserv2.jar wrapper.classpath=$ORACLE_HOME/lib/xschema.jar wrapper.classpath=$ORACLE_HOME/lib/servlet.jar wrapper.classpath=$ORACLE_HOME/lib/lclasses12.zip wrapper.classpath=$ORACLE_HOME/jlib/jndi.jar wrapper.classpath=$ORACLE_HOME/jlib/jta.jar wrapper.classpath=$ORACLE_HOME/jdbc/lib/classes12.zip wrapper.classpath=$ORACLE_HOME/jdbc/lib/nls_charset12.zip replace $ORACLE_HOME appropriately. Also verify for env variables ORACLE_SID, ORACLE_HOME , LD_LIBRARY_PATH are set in jserv.properties.3. Make sure classpath includes the following: For JDK1.2.x: $ORACLE_HOME/jdbc/lib/classes12.zip $ORACLE_HOME/jdbc/lib/nls_charset12.zip $ORACLE_HOME/rdbms/jlib/aqapi.jar $ORACLE_HOME/rdbms/jlib/jmscommon.jar $ORACLE_HOME/rdbms/jlib/aqxml.jar $ORACLE_HOME/rdbms/jlib/xsu12.jar $ORACLE_HOME/jlib/jndi.jar $ORACLE_HOME/jlib/jta.jar $ORACLE_HOME/lib/xmlparserv2.jar $ORACLE_HOME/lib/xschema.jar $ORACLE_HOME/lib/servlet.jar $ORACLE_HOME/lib/lclasses12.zip $ORACLE_HOME/jlib/javax-ssl-1_2.jar $ORACLE_HOME/lib/http_client.jar $ORACLE_HOME/lib/http_server.jar 4. Set up AQ Servlets a. Create the servlet that extends AQxmlServlet. AQxmlServlet for jdk1.1.x and AQxmlServlet20 for jdk 1.2.x. Implement method init(). In this method setAQDataSource() to establish database connection. In this example, AQDemo.java servlet is created for you. Modify sid, host, port in the function createAQDataSource and Compile this servlet. javac AQDemo.java b. Put the servlet in the directory for AQ servlets. In this example, put AQDemo.class in $ORACLE_HOME/Apache/Jserv/servlets5. Database set up a. Make sure init.ora file contains: compatible = 9.0.0 or higher aq_tm_processes = 1 or higher job_queue_processes = 2 or higher b. Set up User Authorization for Internet access In this example, qs_ia_priv.sql to sets up internet users "bob" and "jane". c. Create and start AQ queues. In this example, qs_ia_cr_msgtyp.sql - Creates an Oracle object type qs_ia_cr_q.sql - Creates a queuetable and a queue qs_ia_priv.sql - Grants the required privileges6. Now you are ready to send IDAP requests and perform AQ operations. In this example, BizCardOrderForm.html and processBizCardOrder.js have been created for you. Make these files accessible through your webserver. Please read RunDemo.txt for instructions on how to use the demo.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -