Handle Xmpp group in objc - xmppframework

I have created room with XMPPFramework in objc .. I created it successfully but when I m going to offline that time room was destroy. I also no idea where I should place invite function to add user in group (room). please sort out for me.

It's destroyed probably because you created a temporary room, which is destroyed after last occupant left it.
XMPP rooms can be persistent vs. temporary
Here is a XEP-0045 config on how to handle it
<field
label='Make Room Persistent?'
type='boolean'
var='muc#roomconfig_persistentroom'>
<value>1</value>
</field>
https://xmpp.org/extensions/xep-0045.html#registrar-formtype-owner

Related

SSRS When uploading report owner name is wrong

I have SQL 2014 professional version 12.0.5000.0 with SSRS runing. eI have created a report in report builder 3.0 which works and runs find.
However when I go to create a subscription and run I get the user a1234 (as a example ) don't exist.
I looked there is no user with that name added to SSRS or in our domain.
my user name is ah1234 (as a example )
I looked in the subscription table and the owner is me ? However, the subscription is showing the owner as a1234?
I checked the report I uploaded it says the owner is a1234.
I'm thinking it might be a active directory issue but not sure.
Has anyone has see this before if so how can I fix the owner name of the subscription?
I don't know how SSRS has corrupted the owner name but here is a trick (written on 2008 R2) to correct owner names (I use this when people leave & their Active Directory user id gets deleted leaving orphaned subs that will not run).
Note that it updates the Microsoft-supplied subscriptions table, you may not wish to do that.
First identify the SSRS owner id for the from-person & also that of the to-person (you may need to get the to-person to create a subscription first):
SELECT distinct [OwnerID], u.username
FROM [<ssrs-database>].[dbo].[Subscriptions] s
join [<ssrs-database>].[dbo].[Users] u on s.ownerid = u.userid
Now make a safe copy of the subscriptions list, e.g.:
SELECT * into temp.subscriptionscpy
FROM [<ssrs-database>].[dbo].[Subscriptions] s
Now make the change, e.g. (this one changes the owner of all relevant subs):
update [<ssrs-database>].[dbo].[Subscriptions]
set ownerid = 'DDD87598-8957-42C8-8DBC-A893E7174CB6'
where ownerid = 'EBF0E483-69E6-4458-B171-BA28FFCCDF3F'
Now check the owner is as you want it.

Register custom audit events for billing

We are running a custom app on Invantive Data Access Point which adds business functionality to Exact Online. For billing purposes, we would like to somehow register actual use of the software as defined in business terms instead of memory used, CPU, SQL statements executed, etc.
We do not yet have custom tables and I would like to keep it that way, so the whole state is kept in memory and in Exact Online only. So "insert into mytable#sqlserver..." is not an option. Neither does Exact Online offer the possibility to create custom tables as with Salesforce.
How can we somehow register billable events, such as "Performed an upload of 8 bank transactions" under this condition?
For billing purposes, you can lift along on the Customer Service infrastructure, which is similar to functionality offered by AWS or Apple for this purpose in their eco system. The "table" which stores the billing events like a Call Detail Record of a PBX is managed by Customer Service infrastructure.
There are two options:
Your apps use the default audit and license event registrations like "User logged on", "First use of partition #xyz", etc. each with a specific message code like 'itgenlic125'.
Your apps define their own event types like "Performed an upload of bank transactions", with a message code 'mybillingmessagecode123' and the number '8' as quantity in the natural key.
The first option is automatically and always done. These data is also used to manage resource consumption and detect runaways.
The second option is best done using Invantive SQL with the data dictionary table "auditevents". All records inserted into auditevents are automatically asynchronously forwarded to Customer Service. To see the current register audit events since start of application:
select *
from auditevents#datadictionary
where:
occurrence_date: when it happened.
logging_level: always "Audit".
message_code: code identifying the type of event.
data_container_d: ID of the data container, used with distributed SQL transactions.
partition: partition within the data container for platforms such as Exact Online or Microsoft SQL Server which store multiple databases under one customer/instance.
session_id: ID of the session.
user_message: actual text.
last_nk: last used natural key
application_name: name of the appplication.
application_user: user as known to the application.
gui_action: action within the GUI.
And some auditing and licensing information fields.
To register a custom event:
insert into auditevents#datadictionary select * from auditevents#datadictionary
Only some fields can be provided; the rest are automatically determined:
message_code
user_message
last_natural_key
application_name
application_user
gui_action
gui_module
partition
provider_name
reference_key
reference_table_code
session_id
To receive the billing events yourself from the infrastructure, you will need to access the Customer Service APIs or have them automatically forwarded to mail, Slack, RocketChat or Mattermost channel.
A sample SQL:
insert into auditevents#datadictionary
( message_code
, user_message
, last_natural_key
, application_name
, gui_action
, gui_module
, reference_key
, reference_table_code
, partition
)
select 'xxmycode001' message_code
, 'Processed PayPal payments in Exact Online for ' || divisionlabel user_message
, 'today' last_natural_key
, 'PayPalProcessor' application_name
, 'xx-my-paypal-processor-step-2' gui_action
, 'xx-my-payal-processor' gui_module
, clr_id reference_key
, 'clr' reference_table_code
, division partition
from settings#inmemorystorage

How to get all fields from ejabberd from MUC module?

We want to get all fields from this link (http://xmpp.org/extensions/xep-0045.html#roomconfig) for this section
Example 165. Service Sends Configuration Form to Owner
In the specification it is showing all fields, but we are not getting all fields from ejabberd like:
<field label='Roles and Affiliations that May Retrieve Member List' type='list-multi' var='muc#roomconfig_getmemberlist'>
We want to get muc#roomconfig_getmemberlist, but it is not getting from ejabberd.
What config we need to change to get all field like above link?
ejabberd is return all the field it supports. At the moment ejabberd does not support changing the affiliation of users allowed to retrieve the member list. It is assumed, that MUC admin, room owner and members can retrieve the member list.
That said, even if you do not have that field in the configuration form, ejabberd supports managing member list.
You can retrieve the members list from a user with proper credentials, sending the following query:
<iq type="get" to="room#conference.example.net" id="aac1a">
<query xmlns="http://jabber.org/protocol/muc#admin">
<item affiliation="member"/>
</query>
</iq>
You will receive a reply of the form:
<iq from="room#conference.example.net" type="result" id="aae0a">
<query xmlns="http://jabber.org/protocol/muc#admin">
<item affiliation="member" jid="newmember#example.net"/>
</query>
</iq>

Solr dataimport handler cacheImpl does not retrieve rows

I am currently working on a dataimport handler that retrieves data from MySQL for quick searching. It consists of the import of a root entity CabinCategoryFares and a few child entities (Cruise, RouteDay, Ship).
This import works, but is very slow as the relation between e.g. CabinCategoryFares and Cruise is many-to-one so there are many identical queries on Cruise fired.
To alleviate this, I am trying to implement the SortedMapBackedCache caching on the child entities. Below a snippet, the original is quite big.
<document name="Cruises">
<entity name="CabinCategoryFare" transformer="RegexTransformer" query="SELECT CabinCategoryFare.cruise_id FROM CabinCategoryFare">
<entity name="Cruise" cacheImpl="SortedMapBackedCache" cacheKey="Cruise.id" cacheLookup="CabinCategoryFare.cruise_id"query="SELECT Cruise.id FROM Cruise">
</entity>
</entity>`
This returns NULL for every field that is read from Cruise. I can tell from the logs that the dataimporthandler is running the Cruise query, but it just isn't returning any results or any errors after that. It seems it isn't able to find any hits on the cacheLookup, but logging in the DIHCacheSupport class is non-existant and I'm at a total loss what's happening, or rather why it isn't happening.
Any thoughts?
Found the problems:
1. Bug in Solr/DIHCacheSupport.java: https://stackoverflow.com/a/21732907/3012497
(cacheKey gets uppercased somewhere in the process, cacheLookup does not so one needs to always use an uppercase cacheLookup)
2. The query for the Cruise entity uses a grouping function (GROUP_CONCAT), but didn't have a GROUP BY clause. This wasn't a problem uncached (because of the WHERE clause) but would still only return one row without where.
3. DIHCacheSupport seems to only work with string keys, int key will cause an exception that does not show up in the logs.
Hope this might save someone a few hours.

Service Broker external activator... activate on 2 queues?

I have 2 queues and more to come... I want to have those queues externally activated using the external activator.
When I edit the EAService.config to activate queue#1 it works just fine.
When I edit the EAService.config to activate queue#2 it works just fine.
If I put both in the config only the one listed first gets activated.
Both queues are actually getting processed by the same exe... and example of what doesn't work is this...
<NotificationServiceList>
<NotificationService name="my_notif_svc1" id="100" enabled="true">
<Description>my notification service 1</Description>
<ConnectionString>
<Unencrypted>server=my_pc01;database=my_db;Application Name=External Activator;Integrated Security=true;</Unencrypted>
</ConnectionString>
</NotificationService>
<NotificationService name="my_notif_svc2" id="100" enabled="true">
<Description>my notification service 2</Description>
<ConnectionString>
<Unencrypted>server=my_pc01;database=my_db;Application Name=External Activator;Integrated Security=true;</Unencrypted>
</ConnectionString>
</NotificationService>
</NotificationServiceList>
<ApplicationServiceList>
<ApplicationService name="myMessageApp1" enabled="true">
<OnNotification>
<ServerName>my_pc01</ServerName>
<DatabaseName>my_db</DatabaseName>
<SchemaName>dbo</SchemaName>
<QueueName>my_user_queue1</QueueName>
</OnNotification>
<LaunchInfo>
<ImagePath>c:\test\myMessageReceiver.exe</ImagePath>
<CmdLineArgs>whatever cmd-line arguments you need to pass to your receiver application</CmdLineArgs>
<WorkDir>c:\test</WorkDir>
</LaunchInfo>
<Concurrency min="1" max="4" />
</ApplicationService>
<ApplicationService name="myMessageApp2" enabled="true">
<OnNotification>
<ServerName>my_pc01</ServerName>
<DatabaseName>my_db</DatabaseName>
<SchemaName>dbo</SchemaName>
<QueueName>my_user_queue2</QueueName>
</OnNotification>
<LaunchInfo>
<ImagePath>c:\test\myMessageReceiver.exe</ImagePath>
<CmdLineArgs>whatever cmd-line arguments you need to pass to your receiver application</CmdLineArgs>
<WorkDir>c:\test</WorkDir>
</LaunchInfo>
<Concurrency min="1" max="4" />
</ApplicationService>
</ApplicationServiceList>
additionally I don't understand what the id="100" is doing... I tried having same # and different #... ie 100 & 101 but it didn't make a difference. The activator service only works for the first one listed in the "ApplicationServiceList"
help!
I figured out my problem...
From the documentation
Systems can use external activation
for multiple Service Broker
application queues. There is a
many-to-one relationship between
application queues and activation
notification services. There is a
one-to-one relationship between the
Activation Notification service and
the External Activation service.
I was two notification services (my_notif_svc1 & my_notif_svc2) listed above. I switched my event notifications (create event notivation ... ) to utilize the same "TO SERVICE" and now it works.
So you have to utilize one "service" for external activator but you can create multiple Event Notifications for multiple queues which point to that service.
I still think the way I had it set up it should work but this definitely works...
I also ran into this same problem and it would be nice to have an official response from Microsoft as to why and if they will honor multiple notification services listed in SSBEA and not just the first one in the list. In the end we went with the same solution, and here is a helpful snippet to use to dynamically to get the Guid and setup the queue activation event to a SINGLE service (ServiceBrokerNotification.NotificationService).
DECLARE #sbn nvarchar(100) = 'servicebrokernotification'
DECLARE #sbnid nvarchar(60)
SELECT #sbnid = ''''+CAST(service_broker_guid AS nvarchar(60))+'''' FROM sys.databases WHERE name = #sbn
SELECT #sbnid
DECLARE #Str nvarchar(max)
DECLARE #createEventSql nvarchar(max)
Set #Str = 'CREATE EVENT NOTIFICATION NotificationEvent ON QUEUE [TargetQueue]
FOR QUEUE_ACTIVATION TO SERVICE ''NotificationService'' ,' + #sbnid;
Select #Str
EXECUTE (#Str)