Activate tracing using WLST for OSB - weblogic

I can manually enable tracing for a proxy service on Oracle Service Bus Console. I would like to do that same action using WLST. I've been able to write scripts that enable or disable the service, but not the tracing feature so far?
Any ideas on how to accomplish this task?

You can't do it via standard OSB customisation. I work around this by altering the sbconfig.jar before upload.
https://github.com/tomecode/OSB-Config-WLST-Configurator

Related

Mule ESB Instance Monitoring

what is the best way to monitor the Mule ESB instances. Is there a way i can get alerted when my mule instance goes down for some reason. I have 4 instances of Mule running and how will I come to know if 1 of them got down due to some reason.
Thanks!
I assume you are running community edition? (Enterprise edition provides a Management Console which allows you to define alerts). If you are using CE, then you are able to enable JMX monitoring on the instances and then use one of many ways to verify based on JMX info, whether your server is running. One way is to write your own application that retrieves JMX data programmatically and act accordingly.
HTH
If you are using Mule EE, you can use MMC to monitor all your instances as Gabriel has already suggested. My suggestion would be to install MMC inside tomcat on a separate server. This is to ensure that even if your Mule Server crashes or goes down, your MMC is still running and can send you alerts about your Mule server downtime. You can refer below link for details on how to setup server down and up alerts.
https://developer.mulesoft.com/docs/display/current/Working+With+Alerts
Additionally I would recommend to use MMC with database persistence to ensure you have ability to recover MMC workspace even if your MMC server crashes. You can refer about MMC setup with DB persistence at below link.
https://developer.mulesoft.com/docs/display/current/Configuring+MMC+for+External+Databases+-+Quick+Reference
If you don't have Mule EE, you may want to explore other tools or customer alerting applications as suggested by Gabriel.
HTH
You can set up a JMX agent by adding the following lines into your "conf/wrapper.conf" file :
wrapper.java.additional.19=-Dcom.sun.management.jmxremote
wrapper.java.additional.20=-Dcom.sun.management.jmxremote.port=10055
wrapper.java.additional.21=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.22=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.23=-Djava.rmi.server.hostname=127.0.0.1
don't forget to change the values accordingly. Also you can implement SSL authentication with a few extra lines.
Now once your monitoring platform is set up you can always activate Java pollers and start the server.

WCF tracing in Azure production

How do I set WCF tracing in Azure (production environment) so that I'll have logging of all WCF errors?
Can't you use Windows Azure Diagnostics for this purpose? Once it is properly configured, your trace logs will be available in a Windows Azure Storage account that you have specified in your code. More information about Windows Azure Diagnostics can be found here: https://www.windowsazure.com/en-us/develop/net/common-tasks/diagnostics/.
Just like Guarav said, you can simply use the Azure diagnostics to log all errors to your storage account (there's a good read in the MSDN Magazine: Take Control of Logging and Tracing in Windows Azure).
Now I personally don't like the 'flat' logging when working with WCF. I find it very important to be able to trace through activities. That's why for all Azure projects where I use WCF I don't use the normal diagnostics.
I use a trick documented by Christian Weyer where I log to a classic *.svclog file and have those files shipped to my storage account. Then I use the CloudBerry Storage Explorer to simply view those logs that include the activites. This is possible by creating a custom XmlWriterTraceListener that writes to a local resource which is shipped to your storage account.

Windows Services & WCF

I need to create a Windows Service to watch a folder on our network and action files that are placed within it. The process is quite slow and I need the ability to check the progress from a client application (which will be running in about 10 places on the same network as the machine running the Windows service).
Is hosting some WCF service in the windows service the right way to go about this and if so, are there any resources on how I would do this?
Thanks!
it seems a reasonable approach to me.
you can get details of how to host a WCF service inside a windows service in the MSDN how to
This code project page also has an example.
you might need to debug start up issues with the service, and I find adding a
Debugger.Launch();
to the beginning of the OnStart method is the easiest way of doing that. it enables you to debug through the start up process of your service and see any exceptions that occur.

Control persisted WF instance (xamlx) without AppFabric

I have a workflow service (xamlx) which implements some complex business process (with persistence and correlation). This service is hosted in IIS and I use AppFabric to control workflow instanses (Terminate them or Cancel).
Now I need to allow users, who don't have administrative rights and, hence, access to AppFabric to stop workflows (Terminate) if they make mistakes while invoking it and restart the workflow.
Is it possible to implement the same logic as it is used in AppFabric with C# code (I plan to create a web service with the help of which it would be possible to terminate workflows)
Thanks in advance!
The AppFabric use a Workflow Control Endpoint to handle all commands you issue using the UI. You can use the WorkflowControlClient in your code to do the same thing. Note that by default the AppFabric used the NetNamedPipeBinding which only allows for local connections so you might need to add another binding like the BasicHttpBinding.

How to configure a running Mule service's properties dynamically?

I would like a recommendation/idea on a method to configure properties for a running Mule service dynamically, i.e. I want the service to pick up the new settings without the need to restart Mule. Typically the kind of properties/settings I would like to change are FTP connector user ID, passwords, service URLs etc.
Any idea would be welcome.
Regards, Ola
Use the URI endpoint format do dynamically address endpoints. In simple cases you may be able to use the message properties in a TemplateEndpointRouter
Otherwise You need to write a component that composes the URI and sends the message to the dynamic endpoint using the MuleEventContext or MuleClient.
See here:
http://www.mulesoft.org/documentation/display/MULE2USER/Outbound+Routers#OutboundRouters-TemplateEndpointRouter
http://www.mulesoft.org/documentation/display/MULE2USER/Using+the+Mule+Client#UsingtheMuleClient-PerforminganEventRequestCall
http://www.mulesoft.org/documentation/display/MULE2USER/Mule+Endpoint+URIs
Mule exposes all service configuration via JMX, but I don't see any obvious way to reconfigure the connectors without a restart. They are internally managing pools of connections.
If there is a limited, you can create connectors for each and reconfigure the routes via jmx attributes.
If it is to be fully dynamic you likely need to implement your own service component to manage the ftp connection. Exposing the connection management, configuration, and restarting via JMX should be pretty straight forward.