[JBoss AS 7 Development] - connecting a remote hornetQ server
by Hans Steiner
Hans Steiner [https://community.jboss.org/people/hans-juergen.stemmer.vkb.de] created the discussion
"connecting a remote hornetQ server"
To view the discussion, visit: https://community.jboss.org/message/729620#729620
--------------------------------------------------------------
Hi out there
I am trying to connect a jboss as 7.1.0 with another jboss that should only act as a hornetQ server (2.2.11).
I see that in the ejb subsystem
<mdb>
<resource-adapter-ref resource-adapter-name="*hornetq-ra"*/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
is configured.
In the message subsystem I use a connector
<connectors>
<connector name="*netty*">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="xxxxx"/>
<param key="port" value="5745"/>
</connector>
</connectors>
that is referenced from the connection pool
<pooled-connection-factory name="*hornetq-ra*">
<transaction mode="xa"/>
<connectors>
<connector-ref connector-name="*netty*"/>
</connectors>
<entries>
<entry name="java:/JmsXA"/>
</entries>
</pooled-connection-factory>
All this works fine, except of an error/warning I receive a few seconds after I have started the server.
> 15:54:20,640 WARN [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] Can't connect to any hornetq server on recovery [XARecoveryConfig [hornetQConnectionFactory=HornetQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5745&host=xxxxx], discoveryGroupConfiguration=null], clientID=null, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false], *username=null, password=null*]]
> 15:54:20,656 WARN [com.arjuna.ats.jta] ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: Error trying to connect to any providers for xa recovery
> at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275) [hornetq-jms-2.2.11.Final.jar:]
> at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77) [hornetq-jms-2.2.11.Final.jar:]
> at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-4.16.2.Final.jar:]
> Caused by: HornetQException[errorCode=2 message=null]
> at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:351) [hornetq-jms-2.2.11.Final.jar:]
> at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251) [hornetq-jms-2.2.11.Final.jar:]
> ... 7 more
>
> 15:54:20,703 WARN [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] Can't connect to any hornetq server on recovery [XARecoveryConfig [hornetQConnectionFactory=HornetQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5745&host=xxxxx], discoveryGroupConfiguration=null], clientID=null, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false], username=null, password=null]]
The queue is found and I can send and receive messages. I use annotations like this
@MessageDriven(name="MyMDB", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "global/myQueue"),
@ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "guest")...
for the mdb.
Can anybody help me with the XA warning? I suppose all I have to do is to configure username and passwort in the right manner. I read something about ra.xml and the resource-adapters subsystem, but I could not find out how to set any properties.
Perhaps there is even a better way to combine a remote hornetQ server with the use of annotations. I am not happy having the messaging subsystem (not present in a standalone.xml without hornetq) in my configuration. Can I delete some portions just leaving the client-part of the jms configuration?
Thx very much for help.
hans
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/729620#729620]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[JBoss AS 7 Development] - JBoss AS 7 is still trying to locate login-config.xml
by valentino cruz
valentino cruz [https://community.jboss.org/people/fabiovc27] created the discussion
"JBoss AS 7 is still trying to locate login-config.xml"
To view the discussion, visit: https://community.jboss.org/message/775472#775472
--------------------------------------------------------------
I have migrated our application from JBoss 4.0.5 to JBoss AS 7 and the only thing left to be completely done is to allow JBoss 7 to authenticate users via Kerberos SSO as we used to in JBoss 4.0.5.
The documentation says that now I can simply use the standalone.xml and put the contents of my previous login-config.xml file in there and specify the type of authentication and necessary properties such as the SPN. However, when I try to login I see this exception on my logs:
+18:17:39,628 WARN [org.jboss.security.auth.login.XMLLoginConfigImpl] (http-executor-threads - 10) *End loadConfig, failed to load config: file:/login-config.xml: java.io.FileNotFoundException: /login-config.xml (No such file or directory)*+
+ at java.io.FileInputStream.open(Native Method) [classes.jar:1.6.0_22]+
+ at java.io.FileInputStream.<init>(FileInputStream.java:106) [classes.jar:1.6.0_22]+
+ at java.io.FileInputStream.<init>(FileInputStream.java:66) [classes.jar:1.6.0_22]+
+ at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) [classes.jar:1.6.0_22]+
+ at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) [classes.jar:1.6.0_22]+
+ at java.net.URL.openStream(URL.java:1010) [classes.jar:1.6.0_22]+
+ at org.jboss.security.auth.login.XMLLoginConfigImpl.loadSunConfig(XMLLoginConfigImpl.java:440) [picketbox-4.0.7.Final.jar:4.0.7.Final]+
+ at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:408) [picketbox-4.0.7.Final.jar:4.0.7.Final]+
+ at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:379) [picketbox-4.0.7.Final.jar:4.0.7.Final]+
+ at org.jboss.security.auth.login.XMLLoginConfigImpl.refresh(XMLLoginConfigImpl.java:118) [picketbox-4.0.7.Final.jar:4.0.7.Final]+
This tells me that somehow JB7 is not aware that I'm trying to configure this information in the standalone.xml file and not in the login-config.xml. I'm not even packaging that file anymore since the documentation says it is no longer used.
Has anyone gotten SSO to work by using their previous login-config.xml contents into the standalone.xml or domain.xml files
Any help woill be greatly appreciated, it seems this portion of the documetation is still lacking quite a bit.
Thank you
-Valentino
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/775472#775472]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[jBPM Development] - Call statefulKnowledgeSession.startProcess() from an SessionBean
by stundzig
stundzig [https://community.jboss.org/people/stundzig] created the discussion
"Call statefulKnowledgeSession.startProcess() from an SessionBean"
To view the discussion, visit: https://community.jboss.org/message/775461#775461
--------------------------------------------------------------
Hi folks,
i would like to call startProcess() and completeWorkItem() on a StatefulKnowledgeSession. Therefore I've an SessionBean and and j2ee-client application.
I call the startProcess from my client and delegates them to the SessionBean. The SessionBean itself does some logic and after that, they should call startProcess() or something else on the current running JBPM application.
But how could I get a reference to the JPAKnowledgeService or StateKnowledgeService or something else? Or a SessionBean which I could get from JNDI?
I've tried some different approaches in the last hours, for example inject persistence unit and build an own Session around it, but without any success.
Could someone point me to the right documentation please or post a code snippet?
I'm using BRMS 5.3.0.
Thanks in advance.
Regards
Steffen...
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/775461#775461]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[JBoss AS 7 Development] - ManagementLayer RBAC
by Heiko Braun
Heiko Braun [https://community.jboss.org/people/heiko.braun] modified the document:
"ManagementLayer RBAC"
To view the document, visit: https://community.jboss.org/docs/DOC-47854
--------------------------------------------------------------
Role based access control to the AS7 management layer.
*Core Concepts*
*
*
When defining an RBAC model, the following conventions are useful:
* Subject = A person or automated agent
* Role = Job function or title which defines an authority level
* Permissions = An approval of a mode of access to a resource
* Action = An operation to execute on a resource
* Constraint: Predicate that makes the permission valid in the context of the system state
* Session = A mapping involving Subject, Role and/or Permissions
https://community.jboss.org/servlet/JiveServlet/showImage/102-47854-21-19... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-47854-2...
*Generic Requirements*
* Provide a usable (in terms of complexity), yet comprehensive base model
* Provide a set of out-of-the-box roles & permissons that reflect common authorization requirements
* Allow to customizations/extension of the default scheme (i.e custom permissions, permission granularity)
* Provide the management operations to retrieve session information (i.e. roles assigned, permissions granted, etc)
* Clearly distinguish security exceptions from other operation errors (i.e. custom response headers)
* Mappability with existing authorisation schemes (i.e. JON)
*Specific Requirements*
+Provide an authorization scheme that distinguishes structural & behavioural permission+:
* structural permissions: control access to resources (i.e. restrict visibility of server groups)
* behavioural permission: control execution on resources (i.e. lock down certain operations, distinguish read & read/write access)
*Use cases*
See https://community.jboss.org/docs/DOC-47856 RBACUsecases*
*
*Advanced Topics*
- Context based access control: i.e. Taking the connection into consideratin
- Support for role hierarchies: i.e. structuring roles to reflect an organizations lines of authority and responsibility
- Role constraints: i.e. mutual exclusive roles
- RBAC to manage RBAC itself
structuring roles to re ect an organiza tion s lines of authority and resp onsibility
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-47854]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 6 months
[JBoss AS 7 Development] - ManagementLayer RBAC
by Heiko Braun
Heiko Braun [https://community.jboss.org/people/heiko.braun] modified the document:
"ManagementLayer RBAC"
To view the document, visit: https://community.jboss.org/docs/DOC-47854
--------------------------------------------------------------
Role based access control to the AS7 management layer.
When defining an RBAC model, the following conventions are useful:
* S= Subject = A person or automated agent
* R = Role = Job function or title which defines an authority level
* P = Permissions = An approval of a mode of access to a resource
* SE = Session = A mapping involving S, R and/or P
https://community.jboss.org/servlet/JiveServlet/showImage/102-47854-18-19... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-47854-1...
*Generic Requirements*
* Provide a usable (in terms of complexity), yet comprehensive base model
* Provide a set of out-of-the-box roles & permissons that reflect common authorization requirements
* Allow to customizations/extension of the default scheme (i.e custom permissions, permission granularity)
* Provide the management operations to retrieve session information (i.e. roles assigned, permissions granted, etc)
* Clearly distinguish security exceptions from other operation errors (i.e. custom response headers)
* Mappability with existing authorisation schemes (i.e. JON)
*Specific Requirements*
+Provide an authorization scheme that distinguishes structural & behavioural permission+:
* structural permissions: control access to resources (i.e. restrict visibility of server groups)
* behavioural permission: control execution on resources (i.e. lock down certain operations, distinguish read & read/write access)
*Use cases*
See https://community.jboss.org/docs/DOC-47856 RBACUsecases*
*
*Advanced Topics*
- Context based access control: i.e. Taking the connection into consideratin
- Support for role hierarchies: i.e. structuring roles to reflect an organizations lines of authority and responsibility
- Role constraints: i.e. mutual exclusive roles
- RBAC to manage RBAC itself
structuring roles to re ect an organiza tion s lines of authority and resp onsibility
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-47854]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 6 months
[JBoss AS 7 Development] - ManagementLayer RBAC
by Heiko Braun
Heiko Braun [https://community.jboss.org/people/heiko.braun] modified the document:
"ManagementLayer RBAC"
To view the document, visit: https://community.jboss.org/docs/DOC-47854
--------------------------------------------------------------
Role based access control to the AS7 management layer.
When defining an RBAC model, the following conventions are useful:
* S= Subject = A person or automated agent
* R = Role = Job function or title which defines an authority level
* P = Permissions = An approval of a mode of access to a resource
* SE = Session = A mapping involving S, R and/or P
https://community.jboss.org/servlet/JiveServlet/showImage/102-47854-16-19... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-47854-1...
*Generic Requirements*
* Provide a usable (in terms of complexity), yet comprehensive base model
* Provide a set of out-of-the-box roles & permissons that reflect common authorization requirements
* Allow to customizations/extension of the default scheme (i.e custom permissions, permission granularity)
* Provide the management operations to retrieve session information (i.e. roles assigned, permissions granted, etc)
* Clearly distinguish security exceptions from other operation errors (i.e. custom response headers)
* Mappability with existing authorisation schemes (i.e. JON)
*Specific Requirements*
+Provide an authorization scheme that distinguishes structural & behavioural permission+:
* structural permissions: control access to resources (i.e. restrict visibility of server groups)
* behavioural permission: control execution on resources (i.e. lock down certain operations, distinguish read & read/write access)
*Use cases*
See https://community.jboss.org/docs/DOC-47856 RBACUsecases*
*
*Advanced Topics*
- Context based access control: i.e. Taking the connection into consideratin
- Support for role hierarchies: i.e. structuring roles to reflect an organizations lines of authority and responsibility
- Role constraints: i.e. mutual exclusive roles
- RBAC to manage RBAC itself
structuring roles to re ect an organiza tion s lines of authority and resp onsibility
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-47854]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 6 months