| Subcribe via RSS

Oracle BAM : Collect and populate real-time data from AQ JMS

August 14th, 2008 | No Comments | Posted in Knowledges

I have been assigned an assignment which is using oracle bam with AQ JMS. For one reason why I have to do this because we don’t have BPEL for designing flow of data. So, I have to use Enterprise Link instead.

Objectives:
1. Create queue, queue table and user-defined object type in Oracle XE.
2. Configure BAM to collect and populate real-time data into ADC.

Create user and grant privilege
1. In order to use aq in Oracle Database, we have to grant privilege to user.

SQL Script
connect sys/welcome1@db10g as sysdba
grant SELECT_CATALOG_ROLE TO scott;
GRANT EXECUTE ON DBMS_APPLY_ADM TO scott;
GRANT EXECUTE ON DBMS_AQ TO scott;
GRANT EXECUTE ON DBMS_AQADM TO scott;
GRANT EXECUTE ON DBMS_CAPTURE_ADM TO scott;
GRANT EXECUTE ON DBMS_FLASHBACK TO scott;
GRANT EXECUTE ON DBMS_STREAMS_ADM TO scott;
execute dbms_aqadm.grant_system_privilege(‘ENQUEUE_ANY’, ‘scott’, TRUE);
grant aq_administrator_role to scott;
grant execute on dbms_lock to scott;
grant execute on sys.dbms_aqin to scott;
grant execute on sys.dbms_aqjms to scott;
exit;



Note: If the user is locked. run this script

SQL Script
ALTER USER scott ACCOUNT UNLOCK;



2. Connect to database as scott user to create AQ

SQL Script
connect scott/tiger@db10g
execute dbms_aqadm.create_queue_table( queue_table => 'bam_ttq_tab',queue_payload_type => 'sys.aq$_jms_text_message', multiple_consumers => true );
execute dbms_aqadm.create_queue( queue_name => 'bam_ttq', queue_table =>'bam_ttq_tab' );
execute dbms_aqadm.start_queue( queue_name => 'bam_ttq' );

HowTo : Disable/Enable Oracle ESB status at runtime: Scheduling polling frequency

August 6th, 2008 | No Comments | Posted in ESB, Oracle

I’m being assigned a task which is Scheduling polling frequency in File adapter. Typically, File Adapter will collect the files from specified folder at the polling frequency time parameter, such as every 1 second or 1 min. What about specified time, every 6pm or every morning? How?? This is my solution. Quartz.

But one thing led to another. How do we invoke the File adapter programmatically? The answer is Oracle ESB API Client. This client will invoke the file adapter and change the status to enabled/disabled at the specified time. Reference

Oracle ESB API can also be invoked via HTTP protocol. You can try this http://localhost:8888/esb/esbConfiguration/executeCommand?action=ExploreServices. This URL will return an XML metadata where you can explore the services in ESB, such as guid and status.

Note: This URL will work for Basic installation, but may be not Advance installation.

And this is how we create quartz to work with OC4J
http://radio.weblogs.com/0135826/2004/04/02.html

This is the example of how we communicate with Oracle ESB API Client

JAVA CODE
ConsoleClient client = ConsoleClientFactory.getConsoleClient(HOST, PORT, USER_NAME,PASSWORD);
client.perform(“UpdateServiceStatus”, requestProps);



The example code

Linux : Everything you need to know about configuration files

August 1st, 2008 | No Comments | Posted in Ubuntu

http://www.ibm.com/developerworks/linux/library/l-config.html