I am working with Openfire with external MySQL database created with the default openfire_mysql.sql from the Openfire server resources folder.
What I am trying to accomplish is to make the attribute persistence work, as described in the Smack API. Attribute stored using createAccount(String username, String password, Map<String, String> attributes) and retrieved using getAttributes
However it seems that the default external database setup is not up for persisting these attributes, I already tried manually adding the row yet still attributes are not persisted.
Anyone have encountered this requirement before?
I would like to do this as well and have looked through some of the openfire sourcecode. I believe the method that persists into the database only handles the fields written in the default openfire_mysql.sql file. You would have to go and modify those new fields into the source code for them to be covered.
Related
I am running Mule Anypoint studio v6.2.4 under Windows. I have an application which gets data records from a SQL Server DB and populates them into Salesforce Org. The application was developed using examples and works fine in the current scenario of one DB and one SF parameters defined in a mule.properties file. This structure works but with serious limitations. Whenever a new DB instance is provided (DEV/QA/SAT/UAT...) and a different destination SF Org is chosen, all the mule applications need to be modified as the access parameters are defined in the property file.
I asked for help about how to dynamically define and use the access parameters in this question. (Defining various DB & Salesforce access information in Mule Anypoint Studio). While the proposed solution worked, it was still based on property file approach. Hence whenever a new DB or SF Org is to be worked on, all the mule applications will still need to be changed because of the property file approach.
A correct approach will be define all the access parameters in an external file. In the mule app, retrieve the appropriate access parameters based on DB name or Org name (provided as http query parameters). Use their values to initialise appropriate mule script variables. This way new DBs or Orgs can be added at will and mule app should work without any re-compilation or changes.
My mule app is batch based and config code fragment to access SQL DB is as follows::
<db:generic-config name="legacyDB" url="jdbc:jtds:sqlserver:${dbHost}:${dbPort};databaseName=${dbName};user=${dbUser};password=${dbPassword}" doc:name="Generic DB Config"/>
How would I accomplish it so that DB or SF access works as defined? Details will help me as I am not that proficient in Mule yet.
Thanks
Kishore
What about reading an external file using a JavaClass and returning a JavaObject to Mule, then you can easily manage those values.
Check this project and change the path in the LoadExternalFile.java to load your own json file. There is an example in the src/main/resources
https://github.com/angelalberici/external-property
I have downloaded the samples from the IdentityServer3 github repo and ran the MembershipReboot project, I changed the connection string to point to a real server but I still don't see how to get it create the database, I thought this used EF code first to do this. I just feel lost right now trying to understand how to use IdMgr and IdSvr.
You were right, The IDS MembershipReboot project relies on MembershipReboot which in itself uses EF migration scripts to generate the database if it doesn't exist (or upgrade it if it's an old one).
But, note that you need the connection string to use a user with permissions to create the database and tables in it.
Also, as far as I can remember you need to actually hit the (IDS) server with a request to get things spin up and create the DB. Otherwise, IDS would not load anything from the IoC container and the DbContext would not get created. But this is something I cannot verify now.
The configuration database of IDS (scopes, clients, claims etc.) is stored in-memory in the MembershipReboot sample you are using. It could be stored in MSSQL using EF (or any other store if you care to implement it). You can see a working sample that uses EF and MSSQL in the EntityFramework sample project. I guess you can combine the two samples get what you are after.
we have a live azure mobile service using dot net backend. The apps using it are out & people are using them.
If we add a few more nullable fields to one of the classes in azure service, will the existing client apps keep working, without an update?
Or do all users must require to update the app before continue using the services?
Existing clients will keep working. On the client side, when it receives objects with properties which it doesn't understand the serializer will just ignore those. On the server side, when it receives the data from old clients, any properties which you have added to the class will have its default value (e.g., if you have a new integer property, it will have the value 0, and for string properties the value null). As long as the logic in the service controller can handle those default values, then your application will be fine.
If you are using entity framework.Base on my test, it's OK.You don't have to change your client-side data model.
P.S. If you just change your entity class.It may clear your database.Be careful with that.
If you want Entity Framework to alter your database
automatically whenever you change your model schema, please use data migrations.
For more information refer to the documentation:
http://msdn.microsoft.com/en-us/data/jj591621.aspx
One of the things why really enjoy working with Breeze is because I have a lot of freedom regarding the metadata, and I use this freedom to manually provide an entity model, including validators. This works great, but when it comes to localizing the messages for the standard validators, I noticed that they use the property names instead of the display names, and this was because I set the display names after the metadata was loaded from server. Well, the thing is that I want to avoid a second call to server just to get the display names. As a temporary solution, I changed the breeze code to allow getting the displayName also from the metadata sent from server, but then again, I do not like changing the breeze sources.
Is there any other way of getting the metadata in one call and provide it to breeze? Naturally, other information like Description or Watermark would be welcome.
The latest versions provide a custom node, which I could use, but then I need some sort of interceptor for each property, where I take the display name and set it to the data and navigation properties. Is there a way to do this?
Remarks: I have a pull request on github for the breeze project, the changes are minimal.
Presumably you've read about Breeze's "custom" metadata support: http://www.breezejs.com/documentation/custom-metadata
If so, then all you need to do is create a custom endpoint on the server that creates json in the 'custom metadata' format (you will probably use reflection on the server to collect this data), and return this json to the client and then call
myMetadataStore.importMetadata(customMetadataFromServer, true);
I'm looking into how to integrate [Authorize] within my MVC 2 application... I'm reading articles about it and I've run the aspnet_regsql tool. I see that my database now containes a bunch of new tables and a whole hell of a lot of SPROCs.
Why is all of this necessary? I thought that I would be able to check login credentials in a table that I've already created for Party ... can't I just call a SPROC that checks the login credentials and then logs the user in? Why all of these new tables and SPROCs?
Because it is the way how it is works. If you using ASP.NET Membership by default you need to have database aspnetdb with lots of tables and stored procs. If you want you may customize that. In order to do that you need to implement custom membership provider.
The simple example how to do that you may find here http://msdn.microsoft.com/en-us/library/aa479048.aspx and here http://www.asp.net/general/videos/how-do-i-create-a-custom-membership-provider also source code available.
It sounds like you want to create a custom membership provider. For logging in I think you really only need to override the ValidateUser method:
http://msdn.microsoft.com/en-us/library/f1kyba5e.aspx
For roles you may be able to get by with overriding only the IsUserInRole method:
http://msdn.microsoft.com/en-us/library/8fw7xh74.aspx