[JBoss Portal] - Re: Custom mapper for cms
by thomas.heute@jboss.com
in portal-cms-sar/META-INF/jboss-service.xml you will find where the default command mapper is defined:
| <mbean
| code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
| name="portal:commandFactory=Delegate,path=content"
| xmbean-dd=""
| xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
| <xmbean/>
| <attribute name="Path">/content</attribute>
| <depends
| optional-attribute-name="DelegatingFactory"
| proxy-type="attribute">portal:commandFactory=Delegating</depends>
| <depends
| optional-attribute-name="DelegateFactory"
| proxy-type="attribute">portal:commandFactory=CMSObject</depends>
| </mbean>
|
Here you can replace it by a command mapper of your choice.
You will see that the tragetWindowRef is defined in the mbean: portal:commandFactory=CMSObject
You can choose to replace this command factory instead of the whole command mapper.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994619#3994619
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994619
19 years, 7 months
[JCA/JBoss] - Re: encrypted dsn connection in JBOSS
by coolheartdil
Hi
I have created the *ds.xml file as
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>betcdb2ds</jndi-name>
<connection-url>jdbc:db2://db2connt.safeway.com:50000/DBU1</connection-url>
<driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
<min-pool-size>0</min-pool-size>
<type-mapping>betcdb2ds</type-mapping>
<!-- Use the security domain defined in conf/login-config.xml -->
<security-domain>EncryptDBPassword</security-domain>
</local-tx-datasource>
and put an entry in login-config.xml i have added the entry
<application-policy name = "EncryptDBPassword">
<login-module code = "org.jboss.resource.security.JaasSecurityDomainIdentityLoginModule"
flag = "required">
<module-option name = "username">BED1TC</module-option>
<module-option name = "password">8Yan5EI.jO3</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=betcdb2ds</module-option>
<!-- <module-option name = "jaasSecurityDomain">jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword</module-option>-->
</login-module>
</application-policy>
and
mbean code="org.jboss.security.plugins.JaasSecurityDomain"
name="jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword">
<!-- The opaque master password file used to decrypt the encrypted
database password key -->
{CLASS}org.jboss.security.plugins.FilePassword:${jboss.server.home.dir}/conf/server.password
abcdefgh
13
Is there anything wrong here
Cool
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994614#3994614
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994614
19 years, 7 months
[JBossCache] - Re: FileCacheLoader partial preload
by emailmsgbox
I'm using POJO cache
this is a test code
| @PojoCacheable
| public class TestData implements Serializable {
| Map<Integer,TestKukuData> kukuMap = new HashMap<Integer,TestKukuData>();
| String myStr;
| int myInt;
| public TestData() { }
| public TestData(String myStr, int myInt) {
| this.myStr = myStr;
| this.myInt = myInt;
| }
| public Map<Integer, TestKukuData> getKukuMap() {
| return kukuMap;
| }
| public void setKukuMap(Map<Integer, TestKukuData> kukuMap) {
| this.kukuMap = kukuMap;
| }
|
| }
| PojoCacheable
| public class TestKukuData implements Serializable {
| String id;
| int miInt;
|
| public TestKukuData() { }
| public TestKukuData(String id, int miInt) {
| this.id = id;
| this.miInt = miInt;
| }
|
| public String getId() {
| return id;
| }
|
| public void setId(String id) {
| this.id = id;
| }
|
| }
|
| public class MYCache {
| final static Fqn TEST = Fqn.fromString("/kuku/test");
| static PojoCacheIfc myCache;
| ....
|
| public static TestData setTest(Integer id, TestData data){
|
| return (TestData)myCache.putObject(new Fqn(TEST,id),data);
| }
| public static TestData getTest(Integer id){
|
| return (TestData)myCache.getObject(new Fqn(TEST,id));
| }
|
|
|
| class MainTest{
| public void do(){
| int id = 1234
| TestData tData = MYCache.getTest(id);
| if(tData == null){
| TestData data = new TestData("TestData",1);
| data.getKukuMap().put(new Integer(11),new TestKukuData("kukuID1",1+id));
| data.getKukuMap().put(new Integer(22),new TestKukuData("kukuID2",2+id));
|
| MYCache.setTest(id,data);
|
| }
| else{
| int size = tData.getKukuMap.size();
| Collection c = tData.getKukuMap.values() ;
| TestKukuData kuku = (TestKukuData )ttData.getKukuMap.getObject(11)
| }
|
|
|
|
| }
|
I run this twice
first time I load the cache , then I restart Jboss
the second time size is 0 and the collection is empty
but kuku is with the right value
what am I missing ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994604#3994604
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994604
19 years, 7 months
[Beginners Corner] - Using handlers in JBoss
by Redhopter
Hi All!
I'm using JBoss 4.0.5. I have written Web Service and deployed it on JBoss.
Also I have written handler such as
| public class MHandler extends GenericHandler{
| public boolean handleRequest(MessageContext context) {
| SOAPMessageContext sctx = (SOAPMessageContext)context;
| SOAPMessage message = sctx.getMessage();
| try {
| SOAPHeader header = message.getSOAPHeader();
| String userName = header.getAttribute("username");
| String password = header.getAttribute("password");
| try {
| FileOutputStream file = new FileOutputStream("C:/Documents and Settings/kbolyand/Desktop/log.txt");
| file.write("Into Handler".getBytes());
| file.write((userName + "=" + password).getBytes());
| file.close();
| }
| catch (FileNotFoundException e) {
| e.printStackTrace();
| }
| catch (IOException e) {
| e.printStackTrace();
| }
|
| }
| catch (SOAPException e) {
| e.printStackTrace();
| }
|
| return true;
| }
| public QName[] getHeaders() {
| return new QName[0];
| }
| }
But I don't know how I must deploy this handler on JBoss WS.
Where I must put this compilled handler, what I must write in properties files?
And big second question: how I must put information into SOAP header of message?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994602#3994602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994602
19 years, 7 months
[JBoss Portal] - Re: IceFaces in JBPortal 2.6DR1
by vitozabal
Java script error:
Line: 1668
Char: 1
Error: Object doesn't support this property or method
Code: 0
generated html code of this portlet:
<div id="default.default.HelloWorldIcefacesSeamPortletWindow">
| <div class="portlet-container"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="portlet-titlebar-left"></td><td class="portlet-titlebar-center handle"><div class="portlet-titlebar-decoration"><span class="portlet-titlebar-title">HelloWorldIcefacesSeamPortletWindow</span></div><div class="portlet-mode-container"><div class="portlet-mode-minimized" onClick="location.href='/dilsy/portal/default/default/HelloWorldIcefacesSeamPortletWindow?action=a&windowstate=minimized';" title="minimized"></div><div class="portlet-mode-maximized" onClick="location.href='/dilsy/portal/default/default/HelloWorldIcefacesSeamPortletWindow?action=a&windowstate=maximized';" title="maximized"></div></div></td><td class="portlet-titlebar-right"></td></tr><tr><td class="portlet-content-left"></td><td class="portlet-body"><div class="portlet-content-center"><script language='javascript' src='/helloworld-icefaces-seam-portlet/xmlhttp/icefaces-d2d.js'></script><iframe frameborder="0" id="history-frame" style="z-index: 10000; visibility: hidden; width: 0; height: 0; opacity: 0.22; filter: alpha(opacity=22);"></iframe><form action="iceSubmit('jbpc863eae7_id1');" class="iceForm" context_type="class com.icesoft.faces.context.BridgeFacesContext" enctype="application/x-www-form-urlencoded" id="jbpc863eae7_id1" method="post" onsubmit="return false;" style=""><input name="jbpc863eae7_id1" type="hidden" value="jbpc863eae7_id1"></input>
| <input name="icefacesCssUpdates" type="hidden" value=""></input>
| <input name="viewNumber" type="hidden" value="1004"></input>
| <input name="icefacesID" type="hidden" value="pcWeftIALIDmUpJwEh_eag"></input>
| <div class="iceOutConStat" id="connection-status" style=""><div class="iceOutConStatInactive" id="connection-idle">Active: Idle.</div>
| <div class="iceOutConStatActive" id="connection-working" style="visibility: hidden;">Active: Working...</div>
| <div class="iceOutConStatCaution" id="connection-trouble" style="visibility: hidden;">Caution: Connection in danger.</div>
| <div class="iceOutConStatDisconnect" id="connection-lost" style="visibility: hidden;">Disconnected.</div></div>
| <table border="0" cellpadding="0" cellspacing="0" class="iceTabSet" id="jbpc863eae7_id1:jbpc863eae7_id3"><tr><td class="icePanelTab" id="jbpc863eae7_id1:jbpc863eae7_id3ht0"><table cellpadding="0" cellspacing="0" class="iceTabSetTabOn"><tr><td class="LeftTop"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="MiddleTop"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="RightTop"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td></tr>
| <tr><td class="LeftMiddle"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="MiddleMiddle"><a href="#" id="jbpc863eae7_id1:jbpc863eae7_id3.0" name="jbpc863eae7_id1:jbpc863eae7_id3.0" onblur="setFocus('');" onclick="document.forms['jbpc863eae7_id1']['jbpc863eae7_id1:_idcl'].value='jbpc863eae7_id1:jbpc863eae7_id3';iceSubmitPartial( document.forms['jbpc863eae7_id1'], this,event); return false;" onfocus="setFocus(this.id);"><table cellpadding="0" cellspacing="0"><tr><td><img border="border" class="iceTabSetHdrIconLeft" src="/helloworld-icefaces-seam-portlet/images/hello.png"></img></td><td class="MiddleMiddle">Hello</td></tr></table></a></td><td class="RightMiddle"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td></tr>
| <tr><td class="LeftBottom"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="MiddleBottom"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="RightBottom"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td></tr></table></td><td class="icePanelTab" id="jbpc863eae7_id1:jbpc863eae7_id3ht1"><table cellpadding="0" cellspacing="0" class="iceTabSetTabOff" onmouseout="this.className='iceTabSetTabOff';" onmouseover="this.className='iceTabSetTabOver';"><tr><td class="LeftTop"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="MiddleTop"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="RightTop"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td></tr>
| <tr><td class="LeftMiddle"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="MiddleMiddle"><a href="#" id="jbpc863eae7_id1:jbpc863eae7_id3.1" name="jbpc863eae7_id1:jbpc863eae7_id3.1" onblur="setFocus('');" onclick="document.forms['jbpc863eae7_id1']['jbpc863eae7_id1:_idcl'].value='jbpc863eae7_id1:jbpc863eae7_id3';iceSubmitPartial( document.forms['jbpc863eae7_id1'], this,event); return false;" onfocus="setFocus(this.id);"><table cellpadding="0" cellspacing="0"><tr><td><img border="border" class="iceTabSetHdrIconLeft" src="/helloworld-icefaces-seam-portlet/images/goodbye.png"></img></td><td class="MiddleMiddle">Good Bye</td></tr></table></a></td><td class="RightMiddle"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td></tr>
| <tr><td class="LeftBottom"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="MiddleBottom"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td><td class="RightBottom"><img alt="" height="1" src="/helloworld-icefaces-seam-portlet/xmlhttp/css/xp/css-images/spacer.gif" width="4"></img></td></tr></table></td><td class="iceTabSetTabSpacer"> </td></tr>
| <tr height="100%"><td class="iceTabSet" colspan="3" id="jbpc863eae7_id1:jbpc863eae7_id3td2"><span class="icePanelTab" id="jbpc863eae7_id1:jbpc863eae7_id3:jbpc863eae7_id4"><table border="0" class="icePnlGrd" id="jbpc863eae7_id1:jbpc863eae7_id3:jbpc863eae7_id5" style=""><tbody><tr class="icePnlGrdRow1"><td class="icePnlGrdColumn1" id="jbpc863eae7_id1:jbpc863eae7_id3:jbpc863eae7_id5-0-0"><span class="portlet-font" id="jbpc863eae7_id1:jbpc863eae7_id3:jbpc863eae7_id6" style="">Name:</span></td><td class="icePnlGrdColumn2" id="jbpc863eae7_id1:jbpc863eae7_id3:jbpc863eae7_id5-0-1"><input class="iceInputtext" id="jbpc863eae7_id1:jbpc863eae7_id3:jbpc863eae7_id7" name="jbpc863eae7_id1:jbpc863eae7_id3:jbpc863eae7_id7" onblur="setFocus('');iceSubmitPartial(form,this,event); return false;" onfocus="setFocus(this.id);" onkeypress="iceSubmit(form,this,event);" style="" type="text"></input></td></tr></tbody></table>
| <br><h3><span class="portlet-font" id="jbpc863eae7_id1:jbpc863eae7_id3:jbpc863eae7_id10" style=""></span></h3></span></td></tr></table>
| <input command_link_hidden_field="command_link_hidden_field" name="focus_hidden_field" type="hidden"></input>
| <input command_link_hidden_field="command_link_hidden_field" name="jbpc863eae7_id1:_ideventModel" type="hidden"></input>
| <input command_link_hidden_field="command_link_hidden_field" name="jbpc863eae7_id1:_idcl" type="hidden"></input></form><script id="dynamic-code" language="javascript"></script></div></td><td class="portlet-content-right"></td></tr><tr><td class="portlet-footer-left"></td><td class="portlet-footer-center"></td><td class="portlet-footer-right"></td></tr></table></div></div></div>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994600#3994600
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994600
19 years, 7 months
[JNDI/Naming/Network] - Problem to get from client
by jaleyba
Hi
I've a war application that bind an object with jndi.
Now I want to get this object from a desktop application that is not running in the same VM than JBoss but it couldn´t see my bound object.
I've been looking in FAQ's and now I know why my app couldn´t get my object but I couldn´t found the solution to the problem.
I've seen in usefull code here this code:
| env.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); env.put("java.naming.provider.url","jnp://172.31.112.9:2199"); env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
|
| Context ctx = new InitialContext(env);
| System.out.println("Binds: " + ctx.listBindings("").toString());
|
When I run it I got:
| javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
| java.net.ConnectException: Connection refused: connect]
| at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:872)
| at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:806)
| at javax.naming.InitialContext.listBindings(InitialContext.java:396)
| at CF.main(CF.java:25)
| Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
| java.net.ConnectException: Connection refused: connect
| at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
| at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
| at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
| at org.jnp.server.NamingServer_Stub.listBindings(Unknown Source)
| at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:821)
| ... 3 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
| at java.net.Socket.connect(Socket.java:452)
| at java.net.Socket.connect(Socket.java:402)
| at java.net.Socket.<init>(Socket.java:309)
| at java.net.Socket.<init>(Socket.java:124)
| at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
| at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
| at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
| ... 8 more
|
Which is the trick to allow my app to get the object ?
Thanks in advance
C
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994591#3994591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994591
19 years, 7 months
[JBoss Portal] - Re: UserImpl not mapped
by thanvi
Hi
I am tryign to connect to UserModule using the JNDI anme /portal/UserModule. Its throwing the excpetion.
I need to connect to userModule from my plain java class. How to go about it.
I have tried the followig
UserModule mod = (UserModule) new InitialContext().lookup("java:/portal/UserModule");
It gives the following error
org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:541)
at org.jboss.portal.identity.db.UserModuleImpl.getCurrentSession(UserModuleImpl.java:327)
at org.jboss.portal.identity.db.UserModuleImpl.getUserCount(UserModuleImpl.java:304)
at com.reuters.lipper.dwr.UserDAO.countUsers(UserDAO.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239)
at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:81)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994589#3994589
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994589
19 years, 7 months
[JBoss Portal] - Re: UserModule via JNDI
by thanvi
Hi
I am tryign to connect to UserModule using the JNDI anme /portal/UserModule. Its throwing the excpetion.
I need to connect to userModule from my plain java class. How to go about it.
I have tried the followig
UserModule mod = (UserModule) new InitialContext().lookup("java:/portal/UserModule");
It gives the following error
org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:541)
at org.jboss.portal.identity.db.UserModuleImpl.getCurrentSession(UserModuleImpl.java:327)
at org.jboss.portal.identity.db.UserModuleImpl.getUserCount(UserModuleImpl.java:304)
at com.reuters.lipper.dwr.UserDAO.countUsers(UserDAO.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239)
at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:81)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994588#3994588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994588
19 years, 7 months
[EJB 3.0] - Error persisting entities in EJB3 unknow entity java.lang.Il
by sreeraaman
Hi All,
I am using JSF/Seam/EJB3. Invoking a SLSB method from JSF via Seam throws the following exception:
| 15:05:14,375 ERROR [STDERR] java.lang.IllegalArgumentException: Unknown entity: entities.Client$$EnhancerByCGLIB$$78349cf5
| 15:05:14,375 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:215)
| 15:05:14,375 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:175)
| 15:05:14,375 ERROR [STDERR] at sessionbeans.StandardClientService.sessionbeans$StandardClientService$createClientJSF$aop(StandardClientService.java:92)
| 15:05:14,375 ERROR [STDERR] at sessionbeans.StandardClientService$createClientJSF_N7759129025289692916.invokeNext(StandardClientService$createClientJSF_N7759129025289692916.java)
| 15:05:14,375 ERROR [STDERR] at aoptest.PermissionInterceptor.verifyPermissions(PermissionInterceptor.java:191)
|
I have a jboss aop interceptor for the session bean. Is this creating problems?
Any help would be appreciated.
Thanks in advance.
regards
sriraman.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994586#3994586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994586
19 years, 7 months
[JBoss Seam] - problem to insert users into user table
by JoviJojo
hi,
i have problem to insert logged in users into user table, [org.hibernate.SQL] insert into users (name, password, username) values (?, ?, ?)
2006-12-18 10:28:40,406 INFO [STDOUT] Hibernate: insert into users (name, password, username) values (?, ?, ?)
but from the log file i can see that the user table was created, but i can not find out why the values are not inserted into the table
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994582#3994582
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994582
19 years, 7 months
[Tomcat, HTTPD, Servlets & JSP] - Re: Is it possible to access request parameters within custo
by sreeraaman
Thanks scott for those nice links.
However, my requirement is slightly different and I am newbie to Tomcat. I enabled ExtendedFormAuthenticator to my application as suggested in one of the links.
http://wiki.jboss.org/wiki/Wiki.jsp?page=ExtendedFormAuthenticator
After that, I observed the following output in the server logs:
| 2006-12-18 13:40:56,593 TRACE [org.jboss.web.tomcat.security.JBossSecurityMgrRealm] End authenticate, principal=GenericPrincipal[admin(HiringManagers,Recruiters,)]
| 2006-12-18 13:40:56,593 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] Authentication of 'admin' was successful
| 2006-12-18 13:40:56,593 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] Redirecting to original '/SampleWeb/secure/MainMenu.seam?clientIdentifier=Kenexa'
| 2006-12-18 13:40:56,593 TRACE [org.jboss.web.tomcat.security.ExtendedFormAuthenticator] SessionID: AE87BB0614F54B452EE2FDE877015D00
| 2006-12-18 13:40:56,593 TRACE [org.jboss.web.tomcat.security.ExtendedFormAuthenticator] Setting j_username = admin
| 2006-12-18 13:40:56,593 TRACE [org.jboss.web.tomcat.security.ExtendedFormAuthenticator] Setting j_password = --hidden--
| 2006-12-18 13:40:56,593 TRACE [org.jboss.web.tomcat.security.ExtendedFormAuthenticator] Setting j_exception = null
|
I observed that the ExtendedFormAuthenticator has pushed the j_username, j_password & j_exception into the session which can be used for post login or for error handling.
However, Our requirement is something like this. Our application should support multiple clients with a single code base.
Each client will have their own LDAP configuration. While trying to authenticate the user, I need to know the client to which the user belongs to appropriately load the correct configuration and authenticate the user.
We decided to give the client id as part of the request url via a query string so that somehow we can get them inside the login module.
While browsing the net, I came across a feature in Jetty which allows me to do something like this.
http://docs.codehaus.org/display/JETTY/JAAS.
Jetty has a callback called RequestParameterCallback using which I can get this as shown below:
| public class FooLoginModule extends AbstractLoginModule
| {
| .
| .
| .
|
| public boolean login()
| throws LoginException
| {
| .
| .
| .
| Callback[] callbacks = new Callback[3];
| callbacks[0] = new NameCallback();
| callbacks[1] = new ObjectCallback();
|
| //as an example, look for a param named "extrainfo" in the request
| //use one RequestParameterCallback() instance for each param you want to access
| callbacks[2] = new RequestParameterCallback ();
| ((RequestParameterCallback)callbacks[2]).setParameterName ("extrainfo");
| .
| .
| .
| callbackHandler.handle(callbacks);
| String userName = ((NameCallback)callbacks[0]).getName();
| Object pwd = ((ObjectCallback)callbacks[1]).getObject();
| List paramValues = ((RequestParameterCallback)callbacks[2]).getParameterValues();
|
| //use the userName, pwd and the value(s) of the parameter named "extrainfo" to
| //authenticate the user
| .
| .
| .
| }
|
Do we have a similar stuff in Tomcat and if so can someone please let me know as to how to do the same.?
Thanks in advance.
regards
sriraman.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994579#3994579
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994579
19 years, 7 months