[rules-users] BRMS

Carlsen, Len len.carlsen at ubc.ca
Tue Feb 12 21:09:48 EST 2008


Hi Michael, 

 

Thanks but we would like to reuse the ServiceImplementation but I can't
pass the RulesRepository to another class. I was hoping to use the In
annotation on a constructor so I can pass in the RulesRepository that
way but Seam doesn't allow that.

 

//@In

//public RulesRepository repository = null;

private RulesRepository repository = null;

 

//@In

public ServiceImplementation( RulesRepository repository )

{

      this.repository = repository;

      this.serviceImplementation = new BRMSServiceImplementation(
this.repository );

}

 

No quick fix :-( I guess I'll have to read up on Seam.

 

Thanks for your help,

 

Len

________________________________

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Michael Neale
Sent: Saturday, February 09, 2008 8:50 PM
To: Rules Users List
Cc: Rules Users List
Subject: Re: [rules-users] BRMS

 

Hi len. Yes I think if you create you own in annotation and if you
recompile that may work. If not recompiling, I am not sure. But if you
hack source, we could refactor so the seam stuff is not in the main
class. Another approach is to have the brms as a self contained war, and
have the service called remotely via the repository service interface
(in effect what the web bit does anyway)- that could work better if you
don't need to get at the innards. Do you need it embedded in you app ?
If so, will need to think some more if you dont want to use seam
(basically means refacting in to a separate module the back end bits)

Sent from my iPhone


On 08/02/2008, at 16:09, "Carlsen, Len" <len.carlsen at ubc.ca> wrote:

	Hi,

	 

	I am looking at the Drools BRMS to see how I can reuse the
org.drools.brms.server.ServiceImplementation for other UI toolkits and
also be able to create my own meta-data.  So, I created a plain
BRMSServiceImplementation and removed Seam and GWT from several other
classes and re-wrote the org.drools.brms.server.ServiceImplementation to
use BRMSServiceImplementation so the BRMS still works but I am having
problems with Seam org.jboss.seam.annotations.In annotation since my
BRMSServiceImplementation class uses the ServiceImplementation's
RulesRepository.

	 

	I don't know much about Seam and am wondering if anyone knows if
the @In annotation can be replaced (with another annotation???) and set
to the constructor instead of a class member variable?

	 

	@Name("org.drools.brms.client.rpc.RepositoryService")

	@AutoCreate

	public class ServiceImplementation

	    implements

	    RepositoryService {

	 

	    @In

	    public RulesRepository repository;

	 

	Replace with public ServiceImplementation( RulesRepository
repository )

	 

	If I can get this to work, I'd be happy to submit it to Drools.

	 

	Thanks in advance for any help,

	 

	Len

	_______________________________________________
	rules-users mailing list
	rules-users at lists.jboss.org
	https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080212/234be99d/attachment.html 


More information about the rules-users mailing list