Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  rdbms with mnesia for running triggers.

rkewlani
Posted: Wed Sep 10, 2008 2:24 pm Reply with quote
User Joined: 10 Sep 2008 Posts: 11
I want to use triggers with mnesia, for this purpose I tried to work with RDBMS(open source erlang library).
so,
I downloaded all the files available on
http://jungerl.cvs.sourceforge.net/jungerl/jungerl/lib/rdbms/src/

All the files are being compiled but I m not able to run it. all files are giving some run time error.
for example when I am running
>trigger_test:test1().

It is giving following error-

Inside the get_activity_state()
** exited: {aborted,{{badmatch,undefined},
[{rdbms,register_action,2},
{trigger_test,'-test1/0-fun-0-',0},
{mnesia_tm,apply_fun,3},
{mnesia_tm,execute_transaction,5},
{mnesia,wrap_trans,6},
{erl_eval,do_apply,5},
{shell,exprs,6},
{shell,eval_loop,3}]}} **

When I tried to catch the problem, I came to know that some “rdbms_activity_state” is undefined.
Can any body help me out to know what is "rdbms_activity_state" & how can I use or set it?
also help me, how can I run code available on above site?
View user's profile Send private message
uwiger
Posted: Sun Sep 14, 2008 2:58 pm Reply with quote
User Joined: 03 Jul 2006 Posts: 604 Location: Sweden
rkewlani wrote:
I want to use triggers with mnesia, for this purpose I tried to work with RDBMS(open source erlang library).
so,
I downloaded all the files available on
http://jungerl.cvs.sourceforge.net/jungerl/jungerl/lib/rdbms/src/
...


To use rdbms, you need exactly the right version of OTP, to begin with. Some of the changes needed for rdbms have made it into mnesia, but by no means all. Once you've made sure that you have the right version of OTP, you need to also load all the mnesia patches needed by rdbms. It's been a while, but according to the CVS log, the required mnesia version is 4.2.3.

You can load the patches using rdbms:patch_mnesia()
View user's profile Send private message Visit poster's website
rkewlani
Posted: Fri Sep 19, 2008 5:52 am Reply with quote
User Joined: 10 Sep 2008 Posts: 11
hi uwiger!
Thanks for reply.
But I am still getting the same problem. Earlier I was running the patches from the mnesia already installed on my system and patches were running fine.But after your reply I downloaded patches from jungerl and tried to run the patches using
rdbms:patch_mnesia().
But now patches are also not running. It is throwing some exception.Please help me out, is there any other way by which rdbms_activity_state can be set.
View user's profile Send private message
uwiger
Posted: Fri Sep 19, 2008 9:26 am Reply with quote
User Joined: 03 Jul 2006 Posts: 604 Location: Sweden
rkewlani wrote:
hi uwiger!
Thanks for reply.
But I am still getting the same problem. Earlier I was running the patches from the mnesia already installed on my system and patches were running fine.But after your reply I downloaded patches from jungerl and tried to run the patches using
rdbms:patch_mnesia().
But now patches are also not running. It is throwing some exception.Please help me out, is there any other way by which rdbms_activity_state can be set.


I'll see if I can find some time to look into it. For just running triggers, you don't really need all of rdbms. Triggers can be implemented without any mnesia patches, in fact.

(See e.g. http://www.erlang.org/pipermail/erlang-questions/2005-August/016842.html)

If memory serves, rdbms added an attribute to the mnesia cstruct record, which means that not only do many of the mnesia modules have to be recompiled (that's actually what patch_mnesia() does), but the mnesia schema must also be created with rdbms - or converted, which I don't think I ever got around to.
View user's profile Send private message Visit poster's website
wuji
Posted: Fri Aug 24, 2012 6:31 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
bariatric surgeon at Lenox Hill Hospital in New York."That being being cheap polo shirts being said, clinically I have seen people with bipolar disorder
cyclothymia go through manic episodes following surgery," said Roslin. "This "This knockoff designer *beep* "This can be seen with shopping sprees, divorces, high-risk sexual
and other behaviors. Rather than cause, the weight loss unmasks unmasks [h3]buy real jordans[/h3] unmasks the psychological illness that was long standing and probably
expressed by the depressed side, more than the manic side."However, side."However, cheap replica *beep* side."However, bypass surgery can change absorption of medications, and patients
mood stabilizers need to be monitored carefully, according to Roslin.Bipolar Roslin.Bipolar [h3]cheap polo shirts[/h3] Roslin.Bipolar disorder can cause dramatic mood swings from highs to
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum