Michal Bali | 3 Dec 22:48
Picon
Gravatar

[rules-dev] drools-process-enterprise - JPAPersisterManager should take EntityManagerFactory as an input parameter

Hi Kris,

The JPAPersisterManager is currently creating a new EntityManagerFactory.

It should probably also take an EntityManagerFactory as an input. This is necessary if you already have an EntityManagerFactory in your application you want to reuse it. Two EntityManagerFactories mean two transactional resources that have to be managed by a distributed transaction and that is unnecessary.

If you want I should be able to provide the patch. It should be a simple constructor change :).

I hope I am not starting to bother you with my issues, I might have a few more :)

Thank you.
Best Regards,
Michal

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 5 Dec 12:19

[rules-dev] Drools at Devoxx

Kris and myself will be at Devoxx next week, we will be co-presenting the University session "Declarative programming with Rules, Workflow and Event Processing".

Monday the 8th of Dec, 09.30, room 7.
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Kris Verlaenen | 5 Dec 16:37
Picon

Re: [rules-dev] drools-process-enterprise - JPAPersisterManager shouldtake EntityManagerFactory as an input parameter

Michal,
 
True, thanks for the help.  I suggest you just try to change the code locally so that it fits your requirements, and bundle your comments (and a patch would be nice :)) in a JIRA.  I'll take a look and will try to incorporate those changes in trunk asap !
 
Kris
 
----- Original Message -----
Sent: Wednesday, December 03, 2008 10:48 PM
Subject: [rules-dev] drools-process-enterprise - JPAPersisterManager shouldtake EntityManagerFactory as an input parameter

Hi Kris,

The JPAPersisterManager is currently creating a new EntityManagerFactory.

It should probably also take an EntityManagerFactory as an input. This is necessary if you already have an EntityManagerFactory in your application you want to reuse it. Two EntityManagerFactories mean two transactional resources that have to be managed by a distributed transaction and that is unnecessary.

If you want I should be able to provide the patch. It should be a simple constructor change :).

I hope I am not starting to bother you with my issues, I might have a few more :)

Thank you.
Best Regards,
Michal

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Michal Bali | 6 Dec 02:02
Picon
Gravatar

Re: [rules-dev] drools-process-enterprise - JPAPersisterManager shouldtake EntityManagerFactory as an input parameter

Thank you Kris,
I've submitted the patch:
https://jira.jboss.org/jira/browse/JBRULES-1887
No need to hurry with this.
I haven't tested it. For some reason I can't run my application with locally build drools jars.
Keep up the good work!
Michal



On Fri, Dec 5, 2008 at 3:37 PM, Kris Verlaenen <kris.verlaenen <at> cs.kuleuven.be> wrote:
Michal,
 
True, thanks for the help.  I suggest you just try to change the code locally so that it fits your requirements, and bundle your comments (and a patch would be nice :)) in a JIRA.  I'll take a look and will try to incorporate those changes in trunk asap !
 
Kris
 
----- Original Message -----
From: Michal Bali
Sent: Wednesday, December 03, 2008 10:48 PM
Subject: [rules-dev] drools-process-enterprise - JPAPersisterManager shouldtake EntityManagerFactory as an input parameter

Hi Kris,

The JPAPersisterManager is currently creating a new EntityManagerFactory.

It should probably also take an EntityManagerFactory as an input. This is necessary if you already have an EntityManagerFactory in your application you want to reuse it. Two EntityManagerFactories mean two transactional resources that have to be managed by a distributed transaction and that is unnecessary.

If you want I should be able to provide the patch. It should be a simple constructor change :).

I hope I am not starting to bother you with my issues, I might have a few more :)

Thank you.
Best Regards,
Michal

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev


_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 6 Dec 05:09

[rules-dev] Automatic handling of relationships

I thought of a simple, yet powerful idea, anyone want to give this ago? 
It will be the start of making ontologies more sanily usable for java 
developers.

Person
   @relation(name="OwnerPetRelation", verb="IsOwnerOf")
    Set<Pet> pets;

Pet
   @relation(name="OwnerPetRelation", verb="IsOwnedByf")
    Person owner;

IsOwnerOf and IsOwnedBy do not live on the classpath. The engine detects 
those annotations and generates them as internal classes. Or actually it 
can be one class, where it's able to use the two keywords to reference 
that class in either direction. When you insert your Persons and Pets, 
the relations are automatically inserted too (assuming there are rules 
that use them). This allows people to more naturally explore the 
relational aspect of their data, without having to create and insert the 
relations themselves. Once a Relation is being maintained by the engine, 
any updates to the underlying collection will result in relations being 
added and removed.

If we build in relation inferrence, to avoid the extra binding, it would 
mean that by simply annotating their classes people can do the following 
(Assuming Cat is a type of Pet):

When
    Person( location == London ) IsOwnerOf() Cat( color == "Tabby")
    ....

The above will get all my london people and their tabby cats. The simply 
placement of the IsOwnerOf() pattern, would be nice if () was optioal, 
would constrain the Cat to those related to the Owner. i.e. the short 
hand equivalent of:
$p : Person( location == London ) IsOwnerOf( owner == $p, $c : Cat ) 
Cat( this == $c, color == "Tabby")

I think that's powerful and provides for a hyrbid OO and Relational 
modelling approaches,  asthey can still use graph notation:
person.pets[0].color == "tabby"

This also solves the question that people always ask, how do I insert my 
collection. With that in place there would still be plenty more to do, 
like constraints, but it would be a start to improving Drools' 
relationahip programming "out of the box" capabilities. So who's game?

Mark

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Michael Neale | 8 Dec 05:49
Picon
Gravatar

[rules-dev] Jackrabbit 1.5 is out

Should we update to it pre 5 GA? or too late in the piece?
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Mark Proctor | 8 Dec 07:39

[rules-dev] Re: Jackrabbit 1.5 is out

Michael Neale wrote:
> Should we update to it pre 5 GA? or too late in the piece?
>   
your choice, imho if the tests pass, including guvnor syncing and it's 
not a painful upgrade, update. MarkL will not let Jackrabbit 1.5 go into 
the product for a long time otherwise.

Mark
>
>   

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Nimesh Muley | 8 Dec 07:32

RE: [rules-dev] Re: Jackrabbit 1.5 is out

Hi,

For some other work we have upgraded JackRabbit from 1.3 to 1.5 without much issues. We too have a wrapper on
top of JackRabbit as is the case in Guvnor. We did not face any blockers while upgrading.

Thanks.
Regards,
- Nimesh

-----Original Message-----
From: rules-dev-bounces <at> lists.jboss.org [mailto:rules-dev-bounces <at> lists.jboss.org] On Behalf Of
Mark Proctor
Sent: Monday, December 08, 2008 12:09 PM
To: Michael Neale
Cc: Toni Rikkola; Rules Dev List
Subject: [rules-dev] Re: Jackrabbit 1.5 is out

Michael Neale wrote:
> Should we update to it pre 5 GA? or too late in the piece?
>
your choice, imho if the tests pass, including guvnor syncing and it's
not a painful upgrade, update. MarkL will not let Jackrabbit 1.5 go into
the product for a long time otherwise.

Mark
>
>

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless
specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability
for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and
solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission,
dissemination or other use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus
check on e-mails and attachments before opening them. If you have received this
  e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

David Sinclair | 8 Dec 16:31
Favicon
Gravatar

Re: [rules-dev] Automatic handling of relationships

I actually have something similar. All of our classes are JPA entities. So I get a hold of the JAR that contains all the class definitions and generate traversal rules to spider out the object model. I look for <at> Entity, <at> MapperSuperclass, <at> Emeddeable, etc. This handles 1-1, 1-many, many-1, and many-many.

To asset 1 object and see it follow all the relationships is pretty wild! The only problem is, you sometimes don't want to have all the relationships followed, or else you could end up with half the DB in memory. To solve this, I have TraversalPolicy facts that define when a relationship should be followed. There are default policies that go to a depth of 3 in every direction. Then you can define rules in Guvnor to allow for more fine grained traversal under certain circumstances.

dave

On Fri, Dec 5, 2008 at 11:09 PM, Mark Proctor <mproctor <at> codehaus.org> wrote:
I thought of a simple, yet powerful idea, anyone want to give this ago? It will be the start of making ontologies more sanily usable for java developers.

Person
  <at> relation(name="OwnerPetRelation", verb="IsOwnerOf")
  Set<Pet> pets;

Pet
  <at> relation(name="OwnerPetRelation", verb="IsOwnedByf")
  Person owner;


IsOwnerOf and IsOwnedBy do not live on the classpath. The engine detects those annotations and generates them as internal classes. Or actually it can be one class, where it's able to use the two keywords to reference that class in either direction. When you insert your Persons and Pets, the relations are automatically inserted too (assuming there are rules that use them). This allows people to more naturally explore the relational aspect of their data, without having to create and insert the relations themselves. Once a Relation is being maintained by the engine, any updates to the underlying collection will result in relations being added and removed.

If we build in relation inferrence, to avoid the extra binding, it would mean that by simply annotating their classes people can do the following (Assuming Cat is a type of Pet):

When
  Person( location == London ) IsOwnerOf() Cat( color == "Tabby")
  ....

The above will get all my london people and their tabby cats. The simply placement of the IsOwnerOf() pattern, would be nice if () was optioal, would constrain the Cat to those related to the Owner. i.e. the short hand equivalent of:
$p : Person( location == London ) IsOwnerOf( owner == $p, $c : Cat ) Cat( this == $c, color == "Tabby")

I think that's powerful and provides for a hyrbid OO and Relational modelling approaches,  asthey can still use graph notation:
person.pets[0].color == "tabby"

This also solves the question that people always ask, how do I insert my collection. With that in place there would still be plenty more to do, like constraints, but it would be a start to improving Drools' relationahip programming "out of the box" capabilities. So who's game?

Mark



_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 9 Dec 09:08

Re: [rules-dev] Automatic handling of relationships

David Sinclair wrote:
I actually have something similar. All of our classes are JPA entities. So I get a hold of the JAR that contains all the class definitions and generate traversal rules to spider out the object model. I look for <at> Entity, <at> MapperSuperclass, <at> Emeddeable, etc. This handles 1-1, 1-many, many-1, and many-many.

To asset 1 object and see it follow all the relationships is pretty wild! The only problem is, you sometimes don't want to have all the relationships followed, or else you could end up with half the DB in memory.
The rule verification has code to tell you what classes and what fields are used in rules. This can be used to help you determine when relationships actually need to be added.
To solve this, I have TraversalPolicy facts that define when a relationship should be followed. There are default policies that go to a depth of 3 in every direction. Then you can define rules in Guvnor to allow for more fine grained traversal under certain circumstances.
This sounds like some interesting code, if we could add it with the above idea to minimise what is actually inserted. Fancy on working on this for an optional module for drools for better JPA integration?

Mark

dave

On Fri, Dec 5, 2008 at 11:09 PM, Mark Proctor <mproctor <at> codehaus.org> wrote:
I thought of a simple, yet powerful idea, anyone want to give this ago? It will be the start of making ontologies more sanily usable for java developers.

Person
  <at> relation(name="OwnerPetRelation", verb="IsOwnerOf")
  Set<Pet> pets;

Pet
  <at> relation(name="OwnerPetRelation", verb="IsOwnedByf")
  Person owner;


IsOwnerOf and IsOwnedBy do not live on the classpath. The engine detects those annotations and generates them as internal classes. Or actually it can be one class, where it's able to use the two keywords to reference that class in either direction. When you insert your Persons and Pets, the relations are automatically inserted too (assuming there are rules that use them). This allows people to more naturally explore the relational aspect of their data, without having to create and insert the relations themselves. Once a Relation is being maintained by the engine, any updates to the underlying collection will result in relations being added and removed.

If we build in relation inferrence, to avoid the extra binding, it would mean that by simply annotating their classes people can do the following (Assuming Cat is a type of Pet):

When
  Person( location == London ) IsOwnerOf() Cat( color == "Tabby")
  ....

The above will get all my london people and their tabby cats. The simply placement of the IsOwnerOf() pattern, would be nice if () was optioal, would constrain the Cat to those related to the Owner. i.e. the short hand equivalent of:
$p : Person( location == London ) IsOwnerOf( owner == $p, $c : Cat ) Cat( this == $c, color == "Tabby")

I think that's powerful and provides for a hyrbid OO and Relational modelling approaches,  asthey can still use graph notation:
person.pets[0].color == "tabby"

This also solves the question that people always ask, how do I insert my collection. With that in place there would still be plenty more to do, like constraints, but it would be a start to improving Drools' relationahip programming "out of the box" capabilities. So who's game?

Mark



_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________ rules-dev mailing list rules-dev <at> lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Gmane