[JBossCache] - Jboss Tree Cache EJB Remote Clients Problems
by chicago_pool_dude
Hi every one,
We have an internal class implementation with in our organization of Jboss Tree Cache. Which wraps around the one from JBoss, this was done as way to avoid the users to cut the direct dependency on JBoss. We want this service to be used by clients from across the network so we put a stateless session bean before that more of a façade, and Tree Cache is will be instantiated using Spring Core. We were of the opinion that through spring we can not only get an instance of the Tree Cache but also we can take care of it being singleton. So our session bean has put and gets methods to put an object, but the interface works fine in one session call, I can put and get the methods. But when I put an object into Tree Cache in one session bean call and later try to retrieve it from another call I get a ?null?. Can any please tell me what is happening here and how we can get a EJB interface to Tree Cache.
Thanks in advance.
Regards,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958492#3958492
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958492
19 years, 9 months
[Security & JAAS/JBoss] - Integration of Custom Client and Server Login Modules
by kearns
Objective: to authenticate using a custom client login module and pass the subject, containing the credentials customer ID and NHS #, to a custom server login module. This does no authentication but simple maps the customer ID to a role in order to invoke a secured EJB.
How:
I have listed below 4 different approaches I used.
(1) Created the following components:
? Custom client login module (reference article: All that JASS):
ConsoleCallbackHandler
PassiveCallbackHandler
RdbmsCredential
RdbmsLoginModule
RdbmsPrinciple
? Custom server login module (reference article: Securing EJB Applications with Custom JBoss Login Modules) :
CustomServerLoginModule
? used JBoss client login module to bind subject.
? added RDBMS Login Module (custom client login module) to /example domain in login-conf.xml
? added CustomServerModule to security domain (secureBankDomain) for EJB application
extract from login-config.xml
<application-policy name = "Example">
<login-module code="com.jaas.RdbmsLoginModule" flag = "required">
<module-option name="url">jdbc:mysql://localhost/jaasdb</module-option>
<module-option name="usr">root</module-option>
<module-option name="pwd">steelbus581</module-option>
<module-option name="driver">com.mysql.jdbc.Driver</module-option>
<module-option name="debug">true</module-option>
</login-module>
<login-module code="org.jboss.security.ClientLoginModule"
flag = "required">
</login-module>
</application-policy>
<application-policy name = "SecureBankDomain">
<login-module code="bank.jaas.CustomServerLoginModule" flag = "required">
<module-option name="debug">true</module-option>
</login-module>
</application-policy>
Subsequently realised that the only the username and password handled by the call back is past to the server login module. Therefore this approach would not work.
(2) Pass the credential and principle in initial context e.g. Context.SECURITY_PRINCIPAL prior to getting a reference to the remote EJB.
HashTable props = new HashTable();
props.put( Context.SECURITY_PRINCIPAL,
SecurityAssociation.getPrincipal() );
props.put( Context.SECURITY_CREDENTIALS,
SecurityAssociation.getCredential() );
InitialContext initialContext = new InitialContext( props );
On invoking the server login method it fails as no identity, i.e. Principle, can be found
(3) Created a PrivilegedAction i.e. CallBankMgrGetCustData that would get the EJB reference and execute the method. This also fails as no identity can be found.
(4) Pushed credential and principle onto SecurityAssociation stack. However an error occurred as on the RdbmsPrincipal class could not be found ? no class loader. Then added com.bank.RdbmsCredential and RdbmsPrincipal to server/default/lib as jar. Still the customer server login module fails as no identity, i.e. Principle, can be found.
Question:
What have I not understood or not configured correctly. Or is what I am trying to do not possible. Any help would be appreciated.
References:
All That JASS: http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas_p.html
Writing Custom JAAS Login Modules. 21 Nov 2003. http://www.timfanelli.com/blog/item/custom_jaas_login_modules.html
Securing EJB Applications with Custom JBoss Login Modules. 21 Nov 2003 http://www.timfanelli.com/item/98
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958490#3958490
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958490
19 years, 9 months
[JBoss jBPM] - Re: Transactions fail due to confiuration of Persistence
by falazar
Im not sure about the hilo part, but for oracle, we created and used teh OracleDS instead:
Making the JBPM Web Application use our Oracle DataSource
The first is ${JBOSS_HOME}/server/jbpm/deploy/jbpm.sar/META-INF/jboss-service.xml, which is used to control what DataSource the JBPM web application uses for its discrete JDBC activity.
We want this file to look like this:
| <?xml version="1.0" encoding="UTF-8"?>
| <server>
| <mbean code="org.jbpm.db.jmx.JbpmService"
| name="jboss.jbpm:name=DefaultJbpm,service=JbpmService"
| description="Default jBPM Service">
| <attribute name="JndiName">java:/jbpm/JbpmConfiguration</attribute>
| <depends>jboss.jca:service=DataSourceBinding,name=OracleDS</depends>
| </mbean>
| </server>
|
(this is taken from teh Oracle JBMP wiki page I sent you, which has some more instructions as well)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958489#3958489
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958489
19 years, 9 months
[EJB/JBoss] - [1/2 SOLVED] [URGENT] Classloading issue
by beugeair
Hello,
I have found a solution that I can not explain :
In the tomcat sar / WEB-INF / jboss-service.xml
I put the UseJbossWebLoader on to enable the use of JBoss classloading in place of Tomcat Class loading ... I think.
| <!-- A flag indicating if the JBoss Loader should be used. This loader
| uses a unified class loader as the class loader rather than the tomcat
| specific class loader.
| The default is false to ensure that wars have isolated class loading
| for duplicate jars and jsp files.
| -->
| <attribute name="UseJBossWebLoader">true</attribute>
| <!-- attribute name="UseJBossWebLoader">false</attribute -->
|
If someone can give an logical explaination to this kind of issue, please tell me !
Investigation aborted !
Target aquired !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958483#3958483
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958483
19 years, 9 months