[JBoss Seam] - Caching pages in browser
by lightbulb432
I seem to be getting conflicting info from different resources...people say to make sure browsers don't cache your pages, while page caching is a huge part of increasing performance that others thoroughly recommend
Should you set response headers or meta tags for caching pages to off or on? Does this apply to every single page in your application or does it depend on certain criteria? (I read that for Seam's MVC style with redirects to work browsers shouldn't cache your pages...) Why?
Are there certain criteria (e.g. don't cache any page with a form, or an s:link, or something like that) that make a good rule of thumb for which pages can be cached and which shouldn't?
(I imagine it's still okay to cache purely static pages, but in a Seam application where a "static" page might still be composed of multiple templates, that'll never apply...)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012169#4012169
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012169
19Â years, 2Â months
[JBoss Seam] - Re: SelectItems with objects?
by SmokingAPipe
I tried it like this:
<selectitems:config entity-manager="#{smpc}" />
|
| <component name="smpc"
| class="org.jboss.seam.core.ManagedPersistenceContext">
| <property name="persistenceUnitJndiName">java:/EntityManagerFactories/smpcData</property>
| </component>
|
and then I got:
java.lang.IllegalStateException: entityManager is null
| org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:27)
| org.jboss.seam.framework.EntityQuery$$FastClassByCGLIB$$225925e6.invoke(<generated>)
| net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
Any ideas? I tried changing order of things in components.xml etc but I still get this same exception.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012168#4012168
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012168
19Â years, 2Â months
[EJB 3.0] - Documentation Issue
by FabBoco
Hi,
I downloaded the jboss-EJB-3.0_RC9_Patch_1 version and I am still looking for documentation !
I have tried to build it calling ant into the following directory
| jboss-EJB-3.0_RC9_Patch_1/docs/reference
|
but I get an error:
| /usr/local/jboss-EJB-3.0_RC9_Patch_1/docs/reference/build.xml:29: The following error occurred while executing this line:
| /usr/local/jboss-EJB-3.0_RC9_Patch_1/docs/reference/build.xml:57: The following error occurred while executing this line:
| /usr/local/jboss-EJB-3.0_RC9_Patch_1/docs/reference/build.xml:77: /usr/local/docbook-support/support/lib not found.
|
I think is something related to docbook. Since I don't know it at all, can anyone give my any suggest ?
Regards
Fab.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012163#4012163
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012163
19Â years, 2Â months
[EJB 3.0] - security problem after migrationg to ejb3
by atamur
migrated project to ejb3
looks like it won't take my security domain, because it uses UsernamePasswordLoginModule instead of my custom one =|
although during deployment it says it will take db_store as sec. domain (last listing)
my bean
@Stateless(name = "UserEJB")
| @Remote(User.class)
| @TransactionManagement
| @SecurityDomain("db_store")
| public class UserBean implements User {
| ...
| @TransactionAttribute(TransactionAttributeType.SUPPORTS)
| @PermitAll
| public void create() throws CreateException
| }
| }
my security domain
<application-policy name="db_store">
| <authentication>
| <login-module code="ru.***.PermLoginModule" flag="sufficient">
| <module-option name="dsJndiName">
| DS/Standard
| </module-option>
| <module-option name="principalsQuery">
| SELECT pml_secret FROM permanentlogin p JOIN users u ON (p.usr_id = u.usr_id) WHERE usr_login = ? AND p.pml_secret = ? AND usr_isdeleted = 0
| </module-option>
| <module-option name="rolesQuery">
| SELECT 'CommonUser', 'Roles' FROM users WHERE usr_login = ? AND usr_isdeleted = 0
| </module-option>
| <module-option name="ignorePasswordCase">false</module-option>
| <module-option name="unauthenticatedIdentity">nobody</module-option>
| </login-module>
|
|
| <login-module code="ru.***.SCLoginModule" flag="required">
| <module-option name="dsJndiName">
| DS/Standard
| </module-option>
| <module-option name="principalsQuery">
| SELECT usr_password FROM users WHERE usr_login = ? AND usr_isdeleted = 0
| </module-option>
| <module-option name="rolesQuery">
| SELECT 'CommonUser', 'Roles' FROM users WHERE usr_login = ? AND usr_isdeleted = 0
| </module-option>
| <module-option name="ignorePasswordCase">false</module-option>
| <module-option name="unauthenticatedIdentity">nobody</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
my exception:
javax.ejb.EJBAccessException: Authentication failure
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSecurityException(Ejb3AuthenticationInterceptor.java:70)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:70)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:263)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:58)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| at $Proxy595281.create(Unknown Source)
| at ru.***.ejb.BeanHelper.getUserBean(BeanHelper.java:154)
| ... 21 more
| Caused by: javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
| at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:213)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:152)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
deployment:
2007-02-07 00:50:32,023 DEBUG [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.security.SecurityDomain to ru.***.ejb.main.user.UserBean SecurityDomainImpl[value=java:/jaas/db_store, unauthenticatedPrincipal=null]
| 2007-02-07 00:50:32,023 DEBUG [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.security.SecurityDomain to ru.***.ejb.main.user.UserBean SecurityDomainImpl[value=java:/jaas/db_store, unauthenticatedPrincipal=null]
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012162#4012162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012162
19Â years, 2Â months
[JBoss Seam] - generate-entities problem
by steve_of_AR
Hi everybody, I'm a new user evaluating Seam, must say I like what I've seen so far...
I'm having a problem though with the "seam generate-entities" command, it doesn't appear to do anything for me except generate the single file view/layout/menu.xhtml.
I'm connecting to an Oracle 10.2 database, apparently it's connecting fine, it just doesn't generate any entities(?) The previous steps (seam setup, seam new-project) ran fine and I was able to deploy the hello app that was generated.
Here's the command output when trying to generate entities (sorry it's long):
sharris@schws:~/jboss/seam-1.1.1.GA$ ./seam generate-entities
Buildfile: build.xml
validate-workspace:
validate-project:
generate-entities:
[hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernate] 1. task: hbm2java (Generates a set of .java files)
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.Environment
[hibernate] INFO: Hibernate 3.2 cr4
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.Environment
[hibernate] INFO: hibernate.properties not found
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.Environment buildBytecodeProvider
[hibernate] INFO: Bytecode provider name : cglib
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.Environment
[hibernate] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: Using Hibernate built-in connection pool (not for production use!)
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: Hibernate connection pool size: 20
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: autocommit mode: false
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: using driver: oracle.jdbc.OracleDriver at URL: jdbc:oracle:thin:@ncsoracle03.nctr.fda.gov:1528:sciprod
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: connection properties: {user=sdtm, password=****}
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
[hibernate] With the Partitioning, OLAP and Oracle Data Mining options
[hibernate] JServer Release 9.2.0.4.0 - Production
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC driver: Oracle JDBC driver, version: 10.2.0.2.0
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.dialect.Dialect
[hibernate] INFO: Using dialect: org.hibernate.dialect.OracleDialect
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
[hibernate] INFO: Using default transaction strategy (direct JDBC transactions)
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
[hibernate] INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Automatic flush during beforeCompletion(): disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Automatic session close at end of transaction: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC batch size: 15
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC batch updates for versioned data: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Scrollable result sets: enabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC3 getGeneratedKeys(): disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Connection release mode: auto
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default schema: sdtm
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default batch fetch size: 1
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Generate SQL with comments: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Order SQL updates by primary key: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
[hibernate] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory
[hibernate] INFO: Using ASTQueryTranslatorFactory
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Query language substitutions: {}
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JPA-QL strict compliance: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Second-level cache: enabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Query cache: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory createCacheProvider
[hibernate] INFO: Cache provider: org.hibernate.cache.NoCacheProvider
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Optimize cache for minimal puts: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Structured second-level cache entries: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Statistics: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Deleted entity synthetic identifier rollback: disabled
[hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default entity-mode: pojo
[hibernate] Feb 6, 2007 3:17:58 PM org.hibernate.connection.DriverManagerConnectionProvider close
[hibernate] INFO: cleaning up connection pool: jdbc:oracle:thin:@ncsoracle03.nctr.fda.gov:1528:sciprod
[hibernate] Feb 6, 2007 3:17:58 PM org.hibernate.tool.Version
[hibernate] INFO: Hibernate Tools 3.2.0.snapshotb9
[hibernate] 2. task: generic exportertemplate: view/list.xhtml.ftl
Feb 6, 2007 3:17:58 PM org.hibernate.connection.DriverManagerConnectionProvider close
INFO: cleaning up connection pool: jdbc:oracle:thin:@ncsoracle03.nctr.fda.gov:1528:sciprod
[hibernate] 3. task: generic exportertemplate: view/view.xhtml.ftl
[hibernate] 4. task: generic exportertemplate: view/view.page.xml.ftl
[hibernate] 5. task: generic exportertemplate: view/edit.xhtml.ftl
[hibernate] 6. task: generic exportertemplate: view/edit.page.xml.ftl
[hibernate] 7. task: generic exportertemplate: src/EntityList.java.ftl
[hibernate] 8. task: generic exportertemplate: view/list.page.xml.ftl
[hibernate] 9. task: generic exportertemplate: src/EntityHome.java.ftl
[hibernate] 10. task: generic exportertemplate: view/layout/menu.xhtml.ftl
[javaformatter] Java formatting of 0 files completed. Skipped 0 file(s).
[echo] Type 'seam restart' and go to http://localhost:8080/AT
BUILD SUCCESSFUL
Total time: 2 seconds
Anyone have any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012159#4012159
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012159
19Â years, 2Â months