Bandana or PluginSettings - Which to use

EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2012

I am writing a plugin that requires some config to be stored via an admin screen, and accessed by a REST service.

It appears that both Bandana and PluginSettings are feasible ways to do this. The "Writing an Admin Confguration Screen" tutorial uses PluginSetttings, but there is one concern to me -- PluginSettings stores everything in config.xml -- which is loaded into memory.

Bandana on the other hand stores objects in the database.

SO I would think that for operations that may be accessed frequently (i.e. a REST service) that Bandana may be the better option as I can query for a single object. It may also support better serialization, though nothing in the documentation clarifies.

Can someone help me out on which is the best use case for each mean of persitence?

Cheers,

Eddie

https://developer.atlassian.com/display/FECRUDEV/Storing+Plugin+Settings+for+FishEye

https://developer.atlassian.com/display/DOCS/Plugin+tutorial+-+Writing+an+Admin+Configuration+Screen

https://developer.atlassian.com/display/CONFDEV/Bandana+Caching

https://developer.atlassian.com/pages/viewpage.action?pageId=2031780

3 answers

1 accepted

2 votes
Answer accepted
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2012

It appears the answer is: Neither.

Atlassian is working on new layer in the API called ActiveObjects, and is being pushed as the alternative for both my afermentioned choices.

https://developer.atlassian.com/display/AO/Active+Objects

Tadd Seiff
Contributor
April 7, 2016

It's 4 years later (2016) and I still landed on documentation for Bandana when researching persistence. 

Also the page for AO says in a big red warning box:

"Atlassian does not recommend that you install or upgrade Active Objects in a production environment, unless instructed by the Atlassian support team."

 

So....can haz?  Or no?

0 votes
eib strator
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 8, 2015

I have the same problem. I can explain it but I don't have the solution yet. The instances are from different classloaders instances. - com.atlassian.plugin.classloader.PluginClassLoader and they can't be casted from one to the other.

0 votes
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2012

For bonus points, explain this issue pulling objects out..

[INFO] [talledLocalContainer] java.lang.ClassCastException: com.edwardawebb.bamboo.buildbunny.config.objects.BuildBunnyConfig cannot be cast to com.edwardawebb.bamboo.buildbunny.config.objects.BuildBunnyConfig

They are the same class!! I can call toString and the reference looks correct - what i the deal.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events