Greetings!
I am basing my plugin off of extjs-chassis (part of the html bridge examples)..
I have added the js plugin to my vsphere/vcenter environment. Although when I restart the server, all the data stored/generated in the plugin gets lost. Is there a way to store this information and make it persistent?
The typical scenario would be your plugin to have a separate back-end server.
And that server should provide the persistence that you need.
Every time I log out of my vSphere, I lose the list of names and IP addresses stored in the plugin.
I guess you are storing them in the user session?
I am currently writing the data to a file, and modifying when an object is created, deleted or modified.
If you don't want to deal with databases this is the simplest solution.
Is there a better way of storing objects from a plugin?
There is no public API that the Web Client exposes for persistence.
Can you elaborate further? What kind of information do you want to persist and for how long?
Have you considered using the HTML5 persistence (HTML5 Web Storage)?
Storing data in memory in the Java layer is strongly discouraged.
If you need database persistence, you have to implement it yourself, preferably in another virtual appliance.
Thank you for your rapid response!
Every time I log out of my vSphere, I lose the list of names and IP addresses stored in the plugin.
I am currently writing the data to a file, and modifying when an object is created, deleted or modified.
I would like the data to persist as long as the plugin is installed.
Also don't want the plugin to be browser specific.
Is there a better way of storing objects from a plugin?
The typical scenario would be your plugin to have a separate back-end server.
And that server should provide the persistence that you need.
Every time I log out of my vSphere, I lose the list of names and IP addresses stored in the plugin.
I guess you are storing them in the user session?
I am currently writing the data to a file, and modifying when an object is created, deleted or modified.
If you don't want to deal with databases this is the simplest solution.
Is there a better way of storing objects from a plugin?
There is no public API that the Web Client exposes for persistence.
Do you suggest the backened server being the VCSA's vPostgres? Or is that what you were referring to: "There is no public API that the Web Client exposes for persistence."
For persisting small data files or user settings you can follow the Global View SDK sample which provide such an example.
Do you suggest the backened server being the VCSA's vPostgres?
Not really. It is not that simple. vCenter can be configured to use external database.
I meant a separate virtual appliance where your core logic would reside.
Or is that what you were referring to: "There is no public API that the Web Client exposes for persistence."
The Web Client is using its own primitive file-based persistence which is not public.
Hi folks,
If using an external database, what is the recommended way to securely persist the database access credentials?
> If using an external database, what is the recommended way to securely persist the database access credentials?
The simplest in my opinion is to persist those credentials in an encrypted local file. See the globalview sample for read/write access to a local file.
I noticed the VMWARE_DATA_DIR env variable was introduced in 6.0 - thank you!
Where do I store data in 5.5?
hi Brian,
You can follow the code sample in samples/globalview/globalview-service/src/main/java/com/vmware/samples/globalview/GlobalServiceImpl.java. See getGlobalViewDataFolder().
Now that I found the 5.5 samples I can! :facepalm:
Thanks!