Re: [jboss-user] [JCA Development] - JcaXAResourceRecovery
by Jesper Pedersen
Jesper Pedersen [http://community.jboss.org/people/jesper.pedersen] replied to the discussion
"JcaXAResourceRecovery"
To view the discussion, visit: http://community.jboss.org/message/538057#538057
--------------------------------------------------------------
Anil, I'm currently looking into the best way to hook up a username/password pair to the component to get a Subject.
Basically I have added recover-user-name and recover-password elements to the xa-datasource definition to allow users to specify a special user name and password for the recovery if that is needed. Default is fallback to the standard user-name and password pair.
Also included is a recover-security-domain, just like the security-domain - and same concept as above.
I have injected the
org.jboss.security.SubjectFactory
instance into the component (org.jboss.resource.connectionmanager.ManagedConnectionFactoryDeployment).
So I'm looking for the simplest solution for the following method:
private Subject getSubject()
At the moment I have:
private Subject getSubject()
{
if (subjectFactory != null && recoverSecurityDomain != null)
{
return subjectFactory.createSubject(recoverSecurityDomain);
}
return null;
}
to cover for the recover-security-domain case.
I would like to keep this change inside the component in order to make the minimal changes possible to other components that doesn't need to know about this feature.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538057#538057]
Start a new discussion in JCA Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 2 months
[Beginner's Corner] - Newbie Drools Rule-Writing Question
by Greg Zoller
Greg Zoller [http://community.jboss.org/people/gwzoller] created the discussion
"Newbie Drools Rule-Writing Question"
To view the discussion, visit: http://community.jboss.org/message/538052#538052
--------------------------------------------------------------
Hello,
I'm trying to write a drools rule for the following situation:
I have a user profile object containing a list of Strings representing the roles this user has been granted.
I need a drools rule pattern that matches true if there is an intersection between the user's roles and a list of given roles.
In Java the rule logic would be:
ArrayList<String> okRoles = new ArrayList<String>();
okRoles.add("Internal");
okRoles.add("Admin");
Profile profile = // get profile from wherever...contains list of user's roles: {"User","Internal"}
if( okRoles.retainAll( profile.getRoles() ) == false ) {
// successful match
}
How can I do similar match logic in Drools? Here's where I'm at so far:
rule "Test1"
when
Profile(roles in ("Internal","Admin"))
then
System.out.println("Found role match!");
end
This rule actually runs w/o crashing, but fails to match...presumably because getRoles() returns a list of roles and the list is not in ("ROLE_BUYER").
Any hints how I can accomplish this?
Thanks!
Greg
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538052#538052]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 2 months
[JBoss Tools] - Error when adding JBoss EJB Libraries to project?
by Kip Moore
Kip Moore [http://community.jboss.org/people/ultrapod] created the discussion
"Error when adding JBoss EJB Libraries to project?"
To view the discussion, visit: http://community.jboss.org/message/538047#538047
--------------------------------------------------------------
I'm having trouble adding JBoss EJB 3 libraries to an existing project.
I have downloaded a fresh version of Eclipse 3.5.2, and successfully used the built in "Install" wizard to download and install JBossTools 3.1.0GA. For the sake of troubleshooting, I have created a brand-new Java Project in the IDE. I have also sucessfully created three different Servers, one each for installations of JBoss 4.2.2, JBoss 5.1, and JBoss 6.0M2 that I am currently working with.
So I go ahead and enter the project Properties, select "Java Build Path", and then go to the "Libraries" tab. I click on the "Add Library..." button, select "JBoss EJB3 Libraries", then "Next...", select any one of the declared Servers, and hit "Finish", which brings up the following error:
"The selected configuration <JBoss server> does not contain the expected EJB3 libraries. Please install JBoss with EJB3 enabled, or try another configuration."
I get this error regardless of which server I have selected. Using an existing EJB3 project, I have also verified that EJB3 is indeed installed and working properly across all 3 servers. As near as I can figure out from looking at some of the JBoss Tools code, I have all the right libraries in all the right places, so I'm not sure exactly what is going wrong here. I don't think I'm doing anything wrong here... How can/should I do this properly?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538047#538047]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 2 months