[JBoss Seam] - Re: Advice on Security System
by petemuir
Some experiences from integrating the Security Framework into a couple of apps.
1) If security components aren't configured in components.xml (but the servlet filter has been added)
java.lang.NullPointerException
| at org.jboss.seam.security.filter.SeamSecurityFilter.checkSecurityConstraints(SeamSecurityFilter.java:82)
| at org.jboss.seam.security.filter.SeamSecurityFilter.doFilter(SeamSecurityFilter.java:64)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run()V(Unknown Source)
2) If an empty security constraint element is specified <security-constraint></security-constraint> then an NPE is thrown (sorry, I don't have the trace to hand)
3) +1 for being able to specify 'web-resource-collection' restraints in pages.xml (or have I missed this)
4) If the user is not logged in, and requests a secured page, they get redirected to the securityError.seam page. On this page I have a login box, the user can log in. It would be good if the login is successful, for the user to be redirected to the originally requested page. Is this currently possible (and I've broken something ;) ?
Looking good :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005286#4005286
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005286
19 years, 3 months
[EJB 3.0] - Singleton MDB
by LGSW_Sam
Hi!
We are using JBoss 4.0.5 GA - ejb3, Hibernate 3.2.
Is there a way to implement singleton MDB with ejb3?
We tried
| @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1")
|
but it did not work...
We have two problems at the moment of which one is that our program tries to connect database with connection already being used. We believe that this is related to there being more than one MDB.
Another problem is that we get too many connections to database.
We get these Exceptions while connecting...
| 2007-01-23 13:57:58,817 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] GenericManagedConnection destroy()
| 2007-01-23 13:57:58,817 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] handler fi.logiasoftware.jca.handlers.FTPProtocolHandler@2c902c
| 90 for fi.logiasoftware.jca.adapter.GenericManagedConnection@5d2c5d2c
| 2007-01-23 13:57:58,817 DEBUG [fi.logiasoftware.jca.handlers.FTPProtocolHandler] FTPProtocolHandler boolean isConnected()
| 2007-01-23 13:58:08,971 WARN [fi.logiasoftware.jca.handlers.FTPProtocolHandler] 49 IOException in connect() : Read timed out
| 2007-01-23 13:58:08,972 WARN [fi.logiasoftware.jca.handlers.FTPProtocolHandler] 49Could not connect to 192.194.71.123:21.
| 2007-01-23 13:58:08,972 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Unable to fill pool
| javax.resource.ResourceException: fi.logiasoftware.jca.common.ProtocolHandlerException: 49Could not connect to 192.194.71.123:21.
| at fi.logiasoftware.jca.adapter.GenericManagedConnectionFactory.createManagedConnection(GenericManagedConnectionFactory.java:137)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:565)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:512)
| at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
| at java.lang.Thread.run(Thread.java:797)
| Caused by:
| fi.logiasoftware.jca.common.ProtocolHandlerException: 49Could not connect to 192.194.71.123:21.
| at fi.logiasoftware.jca.handlers.FTPProtocolHandler.connect(FTPProtocolHandler.java:119)
| at fi.logiasoftware.jca.adapter.GenericManagedConnectionFactory.createManagedConnection(GenericManagedConnectionFactory.java:126)
| ... 4 more
| 2007-01-23 13:58:08,978 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnectionFactory] GenericManagedConnectionFactory createManagedConnection(
| Subject subject, ConnectionRequestInfo o)
| 2007-01-23 13:58:08,978 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] GenericManagedConnection GenericManagedConnection(ManagedConnec
| tionFactory)
| 2007-01-23 13:58:08,979 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] GenericManagedConnection setConnection(AbstractProtocolHandler
| handler)
| 2007-01-23 13:58:08,979 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] GenericManagedConnection addConnectionEventListener(ConnectionE
| ventListener arg0)
| 2007-01-23 13:58:08,979 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Filling pool cl=org.jboss.resource.connectionmanager.
| NoTxConnectionManager$NoTxConnectionEventListener@46e046e[state=NORMAL mc=fi.logiasoftware.jca.adapter.GenericManagedConnection@4640464 handles=0 las
| tUse=1169553488979 permit=false trackByTx=false mcp=null context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@6fd06fd0]
| 2007-01-23 13:58:08,979 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnectionFactory] GenericManagedConnectionFactory createManagedConnection(
| Subject subject, ConnectionRequestInfo o)
|
|
Any help would be appreciated!
Br,
Sami
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005285#4005285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005285
19 years, 3 months
[JBoss jBPM] - Integration jBPM with JBoss AS 3.2.8
by brunoduarte
Couldn't find any info about this issue...
I've been trying to integrate jBPM 3.1.3 and BPEL 1.1B3 in our production environment.
We are using J2EE 1.4, JBoss AS 3.2.8, JBoss Rules 3.0.5 and MySQL! In the future we would like to analyze integration with JBoss Cache (clustering?) and LDAP.
We have 3 options:
- jBPM inside our JBoss AS 3.2.8
- jBPM in an independent JBoss AS instance (4.x)
- jBPM standalone;
I've successfully deployed jBPM core inside JBoss AS 3.2.8 (had to change jboss-service.xml) but I can't do much more. Both core and console depend on hibernate 3! Is there a way to deploy jBPM in this AS version and to test websale example?
What you think is the best option to integrate it with our production environment? Standalone or another instance of JBoss AS?
Thanks in advance,
Bruno Duarte
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005281#4005281
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005281
19 years, 3 months
[Persistence, JBoss/CMP, Hibernate, Database] - Hibernate3.jar and <sql-insert>
by jimmycallaghan
My problem is this...
I've got a mapping that uses:
<sql-insert>
| insert into payment_subscriber_account_fund
| (fund_id, subscriber_id, account_number,
| account_holder_name, expiry_date, is_active, full_account_number)
| values (?, ?, ?, ?, ?, ?, aes_encrypt(?, '&key;'))
| </sql-insert>
This was working fine in hibernate 3.0 but I've upgraded my JBoss server from 4.0.3 to 4.0.4 and hibernate has upgraded with it. Now the sql produced doesn't include the aes_encrypt value. After turning on show_sql=true I can see it do this...
insert into payment_subscriber_account_fund (fund_id, subscriber_id, account_number, account_holder_name, expiry_date, is_active, full_account_number) values (?, ?, ?, ?, ?, ?, ?)
Mine seems to be the correct syntax according to the documentation, and I've found one mention of this in another forum that wasn't answered. I'm assuming that this is still possible. The full mapping is as follows:
**********************************************************
<?xml version="1.0"?>
| <!DOCTYPE hibernate-mapping PUBLIC
| "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
| [<!ENTITY key "grGWcw$+BrC6ya($F0[CFx}GYsWdpi-Pzte-tj7rm_wr4J65v,kObyS2sS;">]
| >
|
| <hibernate-mapping>
|
| <class name="com.telrock.mpayment.vo.SubscriberAccountFundVO"
| table="payment_subscriber_account_fund" lazy="false">
|
| <id name="id" type="integer" column="id">
| <generator class="identity"/>
| </id>
|
| <property type="integer" name="fundId">
| <column name="fund_id" not-null="true"/>
| </property>
|
| <property type="integer" name="subscriberId">
| <column name="subscriber_id" not-null="true"/>
| </property>
|
| <property type="string" name="accountNumber">
| <column name="account_number" not-null="true"/>
| </property>
|
| <property type="string" name="accountHolderName">
| <column name="account_holder_name" not-null="false"/>
| </property>
|
| <property type="string" name="expiryDate">
| <column name="expiry_date" not-null="false"/>
| </property>
|
| <property type="boolean" name="active">
| <column name="is_active" not-null="true"/>
| </property>
|
| <property type="string" name="fullAccountNumber">
| <column name="full_account_number" not-null="true"/>
| </property>
|
| <loader query-ref="payment_subscriber_account_fund"/>
|
| <sql-insert>
| insert into payment_subscriber_account_fund
| (fund_id, subscriber_id, account_number, account_holder_name, expiry_date, is_active, full_account_number)
| values (?, ?, ?, ?, ?, ?, aes_encrypt(?, '&key;'))
| </sql-insert>
|
| <sql-update>
| update payment_subscriber_account_fund set fund_id=?, subscriber_id=?, account_number=?,
| account_holder_name=?, expiry_date=?, is_active=?, full_account_number=aes_encrypt(?,'&key;') where id=?
| </sql-update>
|
|
| </class>
|
| </hibernate-mapping>
I created a unit test to reproduce this problem. I have hibernate3.jar and ehcache1.1.jar in the classpath of the unit test. When I run the test the sql that is produced is correct - i.e. it includes the aes_encrypt.
Now I change the hibernate3.jar with the new jar that comes bundled with JBoss404 and replace ehcache1.1.jar with ehcache1.2.jar (also in that JBoss distribution). Run the test again and the sql produced is missing the aes_encrypt.
Next I replace these jars with those that are bundled with JBoss405 and I still have the wrong SQL.
It would seem that <sql-insert> is being ignored by applications using later versions of the hibernate3.jar than that which comes bundled with JBoss403.
Any ideas on how I can get this to work on 404 and above?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005274#4005274
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005274
19 years, 3 months