[Installation, Configuration & Deployment] - jboss login DatabaseServletLoginModule Jboss 4.0.5.GA
by dreuzel
I'm trying to use Mysql als login database but i run into sevral problems.
1) my roles database is composed of 2 items,
--MainFunction related(say default roles) and person relates(roles)
my role file is a union of 2 queries connected with a variable.
doing so I select 3 Coloms instead of 2 Coloms, (RoleID, RoleGroup, a bogus one)
this seems to lock up the DatabaseServletLoginModule
any idea's on how to solve this
Query:
<module-option name = "rolesQuery">
SELECT allow as ROLEID, Role as RoleGroup ,@f:=at.Func FROM authorize ah,authenticate at
WHERE at.user_name=ah.user_name
AND (at.user_name=?) AND (at.Domain='domain')
union select allow as ROLE, Role as RoleGroup , 'add' FROM authorize as ah1 WHERE ah1.user_name=@f </module-option>
</login-module>
Alternatively I had a look in using a stored procedure to add a kind of logging on roles access and doing the above in a stored procedures.
the DatabaseServletLoginModule does not seem to like store procedures either.
query:
"rolesQuery"> call Roles(?)</module-option>
Any idea's on how to solve this
Thanks in advancce
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045385#4045385
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045385
19 years, 1 month
[Installation, Configuration & Deployment] - Multiple applications connection problem
by mex
We are attempting to run
-- two (almost identical) ears
-- on a single instance of JBoss [Zion] 4.0.5.GA
-- using two datasources
-- pointing to two different databases on the same database server.
What happens is that the ear deployed first determines the database used.
In other words, the second ear will connect to the same database as the first one.
Therefore entity beans of the second-deployed application are connected to the wrong database.
When run individually, each application connects to the database as defined in the relevant -ds file.
Details
There are no deployment errors
Both datasources are bound correctly to different JNDI-names and show up correctly in the JNDI-view under the java: Namespace.
The applications are separated in Global JNDI namespace.
Inspecting the log indicates that there is no classloading issue.
Static code sections work properly also indicate there is no problem with classloading.
Accessing the datasources directly from each application via InitialContext.lookup by JNDI also works.
We use two -ds files (putting both datasources into one file made no difference):
first-ds.xml
| <datasources>
|
| <local-tx-datasource>
| <jndi-name>MySql_FIRST_DS</jndi-name>
| <connection-url>jdbc:mysql://ourHost:3306/firstSchema</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>ourName</user-name>
| <password>ourPassword</password>
| </local-tx-datasource>
|
| </datasources>
|
|
| second-ds.xml
| <datasources>
|
| <local-tx-datasource>
| <jndi-name>MySqlDS</jndi-name>
| <connection-url>jdbc:mysql://ourHost:3306:3306/secondSchema</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>ourName</user-name>
| <password>ourPassword</password>
| </local-tx-datasource>
|
| </datasources>
|
Any help appreciated. Thank you
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045382#4045382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045382
19 years, 1 month
[JBoss Seam] - Datamodel question
by koriel
I have a list that I want to expose using the Datamodel annotation
| @DataModel
| List<Users> listUsers;
|
also Users entity contains a list of names like
| public class Users {
|
| ..
| List<Names> names
| ..
| }
|
in my xhtml page i have this code
| <h:dataTable value="#{listUsers}" var="users" rowClasses="odd,even" headerClass="tableHeader" border="0" cellpadding="1" cellspacing="1" first="#{myBean.firstRowIndex}" rows="#{myBean.noOfRows}" width="500" footerClass="tableHeader">
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="User name" />
| </f:facet>
| <h:commandLink action="#{myBean.details}">
| <h:outputText value="#{users.names[?].lastname}" />
| </h:commandLink>
| </h:column>
| </h:dataTable>
|
|
and I wonder if somehow I can print the listUsers.names.get(0).lastname in my xhtml page, which is the first name Object that this user has...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045376#4045376
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045376
19 years, 1 month