Tuesday, November 12, 2013

AQ burst in OSB and notification in BPEL when burst is complete

Create Maximum Thread Constraints


11. On weblogic console Navigate to Environment > Work Managers > New

22.  Define a new maximum threads constraint
3. Define the count number to two


Create a work Manager

11.   Navigate to Environment > Work Managers New
22.   Select work manager

3. Add a name to the work manager
14. Add the server targets that will use the work manager and click finish
25. After created select it from the work managers list

16. Assign the maximum threads constraint option


BPEL notification process


For this BPEL process we are going to use a pattern call aggregation with correlation sets. Basically we are going to correlate all the bpel processes using a batchid and after 15 seconds of not receiving aq messages the process will be closed so we can notify the client that all invoices are consumed.

11.  Create a new schema accepting two parameters an invocieid and batch. Batch is the value that will be used as correlation





12. Create a one way process passing the “request” of the schema as input
23.  BPEL process will  have the following characteristics
a.       Create a while loop when a variable call count < 1
b.      Initialize variable count with 1
c.       Create a pick, If you receive a new message use correlation batch explained in next step
d.      If no more requests are received timeout adding count as value of 1
                                                               i.      In this step you  can add the notification to the customer

14. To create a correlation go the left bar as show in screen and click add

15. Create a correlation naming it “correlationAggregate” add a new property with Name “batch” and string type.    
a.       Assign the received message as the request type and query to bath element of the schema as shown in the screenshot
16. Make sure that “Create Instance” is checked on the receiveInput .

7. Add the correlation set to the “receiveinput” and set the property Initiate to “yes”


18. Add the correlation se to the “onMessage” setting the property initiate to “no”


BPEL process with wait


11. Create a synchronous process that will have the following activites
a.       Call the BPEL notification process
b.      Call a wait of 3 seconds only to see the dealy on each process



OSB burst program


1.1. Create a new proxy service that will call the sync wait process created in the previous step. This proxy service requires to have the following
a.       Throttling state enabled
b.      Maximum concurrency 2
c.       Throttling queue  2


12.  Create a dequeue business service  and cal the service created in step 1
a.       Make sure to add the work manager “wm/aqconsumer”  in the dispatch policy



1.3.  Business service will look like this
a.       Make sure to pass the batch id always the same during the burst



Results

                Disable the OSB process, enqueue some messages


You will see that every 2 seconds 2 processes are picked up and triggered. Also the aggregate process will continue stop and send a notification 15 seconds after the last message is received.









Wednesday, November 6, 2013

How to ssh with no password


1.      1.  ssh-keygen –t rsa on server1
hit return on password
2.      2.  ssh-copy-id –I .ssh/id_rsa.pub user@server2
3.       3. on server2
a.       chmod 700 .ssh
b.      chmod 640 .ssh/authorized_key
4.      4. Finally you can test it ssh user@server2