[JBoss Seam] - Re: Problem with manual flush mode for managed persistence c
by asookazian
Does SMPC work with multiple datasources in the same app? If yes how would you configure the @In injection attribute similar to the @PersistenceContext JPA attribute which you can specify a persistenceUnit name? In the API for the Seam @In annotation there is no element similar to unitName...
| @PersistenceContext(unitName="boIcomsSecurityAudit", type=PersistenceContextType.EXTENDED)
| private EntityManager em;
|
| //@In(create=true)
| //EntityManager em; //a Seam-managed persistence context
I have xyz-ds.xml as below:
<datasources>
|
| <local-tx-datasource>
| <jndi-name>boIcomsSecurityAuditDatasource</jndi-name>
| <connection-url>jdbc:sqlserver://CORG0DV01:1433;databaseName=boIcomsSecurityAudit</connection-url>
| <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
| <user-name>_AppUser_JavaTestAcct</user-name>
| <password>JavaTestAcct</password>
| </local-tx-datasource>
|
| <local-tx-datasource>
| <jndi-name>coxDSSDatasource</jndi-name>
| <connection-url>jdbc:sqlserver://CORG0DV01:1433;databaseName=coxDSS</connection-url>
| <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
| <user-name>_AppUser_JavaTestAcct</user-name>
| <password>JavaTestAcct</password>
| </local-tx-datasource>
|
| <local-tx-datasource>
| <jndi-name>coxIMDatasource</jndi-name>
| <connection-url>jdbc:sqlserver://CORG0DV01:1433;databaseName=coxIM</connection-url>
| <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
| <user-name>_AppUser_JavaTestAcct</user-name>
| <password>JavaTestAcct</password>
| </local-tx-datasource>
|
| </datasources>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113936#4113936
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113936
18 years, 4 months
[JBoss Portal] - CMS security not working
by DanielGallot
Hi,
I am using AS 4.2.2 + portal 2.6.2.
I try to configure the CMS Security.
I have defined a role : myRole. And various users but I want to define CMS security only with roles.
I have defined the following security on the following directories :
For all directories, "Administrators" role has the manage permissions and it is the only one to get it. It has also the read and write permissions everywhere but other roles got them sometimes.
"/" is readable by all the roles excepted "Users" and "Anonymous". No more permissions on "/".
"/MyTopDirectory" is readable by all the roles excepted "Users" and "Anonymous". No more permissions on "/MyTopDirectory".
"/MyTopDirectory/TheUsableDirectory" is readable and writable by "myRole". No more permissions on "/MyTopDirectory/TheManagerDirectory".
I have also defined a new page with the AdminCMSPortlet to let "MyRole" users access it.
But "MyRole" users does not see any directories in this portlet. Just the action menu and get "access denied" or various exceptions if trying to use it.
But even a very simple example does not work :
- do not give any permissions to "Anonymous" role on "/" directory and give it "read" permissions on "default" directory (no permissions are defined on index.html for any role or user) : Access is denied on the /default/index.html of the CMS portlet home page.
If "Anonymous" role has read permissions on "/" directory, it works.
So "Any Permissions specified explicitly on the CMS Node overrides the policy inherited via recursive propagation" as indicated in 14.2 chapter of portal reference guide is not working ?
Yes, I know, I miss something. I have not found it in documentation or in portal user forum.
Thanks a lot for some help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113935#4113935
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113935
18 years, 4 months
[Installation, Configuration & DEPLOYMENT] - migration from jboss-4.0.5.GA to jboss-4.2.1.GA
by chris.katsuo
Hello everybody,
We have to migrate an application written with Seam 1.1.0.CR1 on
jboss-4.0.5.GA ( at this time MyFaces was the built-in JSF implementation) to Seam 2.0.0.GA on jboss-4.2.1.GA.
After a while, we have finally been able to port everything using default configuration (so SUN RI JSF 1.2 built-in JSF implementation).
Actually, we have created from scratch a Seam application using Seam generator and integrate piece by piece our old application.
Unfortunately, one of the third-party component we are using is fckeditor / fck-faces which is built-in on top of MyFaces :(
So reading several posts on the forum and reading blog on internet, we tried to enable MyFaces in our application.
We went through
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBoss5AndMyFaces
but nothing helped us :(
We are totally blocked about this issue and we really need help.
Is there a place with a sample of EAR file using MyFaces in JBoss 4.2.1GA please ?
We would really need a sample of an application with MyFaces bundled in it.
We put
anonymous wrote :
|
| <context-param>
| <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
| <param-value>true</param-value>
| </context-param>
|
in faces-config.xml
we copied the lib myfaces-impl-1.1.5.jar and myfaces-api-1.1.5.jar ( and dependencies) in WEB-INF\lib but we got digester error :
anonymous wrote :
| ERROR [org.apache.commons.digester.Digester] Parse Error at line 2 column 14: Document is invalid: no grammar found.
| org.xml.sax.SAXParseException: Document is invalid: no grammar found.
|
I guess because our faces-config.xml has been created with Seam generator targeted for JSF 1.2
we does the same with myfaces-api-1.2.0.jar and myfaces-impl-1.2.0.jar
but
anonymous wrote :
| ERROR [org.apache.myfaces.webapp.DefaultFacesInitializer] Error initializing MyFaces: Class org.jboss.seam.jsf.SeamApplicationFactory is no javax.faces.application.ApplicationFactory
| java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamApplicationFactory is no javax.faces.application.ApplicationFactory
| at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:128)
| at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:107)
| at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:499)
| at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:190)
| at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:112)
| at
|
I'm sure we missed some steps or configurations specifying that we use MyFaces in place of Sun RI.
This context parameter and the copy of the libraries can't be sufficient.
Please let us know what is missing.
a small sample of an EAR file using MyFaces in place of Sun RI would be extremely helpful.
or is there a guide as seam2migration.txt explaining what we shouldn't remove if we want to keep using MyFaces ?
There is no instructions for this scenario.
Thanks in avance
Christophe Laumond
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113932#4113932
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113932
18 years, 4 months
[Tomcat, HTTPD, Servlets & JSP] - Re: Unwaring web app - leaves some files in the war
by PeterJ
Wait a minute, I think I understand now. What you posted is the code that gets the base directory, and the code that opens the properties file appends "conf/config.properties" top the base to get the file location.
I added your code to my servlet, and here is the output (when all of my classes are in the WEB-INF/classes directory:
11:12:42,640 INFO [STDOUT] ProjectRootClass: Probe URL is vfsfile:/opt/jboss/jboss-5.0.0.Beta2/server/webapp/deploy/inear.ear/webapp.war/WEB-INF/classes/peter/ProjectRootClass.class
11:12:42,641 INFO [STDOUT] ProjectRootClass: The project root was detected at /opt/jboss/jboss-5.0.0.Beta2/server/webapp/deploy/inear.ear/webapp.war
And then I packaged my classes in a jar file and placed it into WEB-INF/lib:
11:17:26,260 INFO [STDOUT] ProjectRootClass: Probe URL is jar:vfsfile:/opt/jboss/jboss-5.0.0.Beta2/server/webapp/deploy/inear.ear/webapp.war/WEB-INF/lib/stuff.jar!/peter/ProjectRootClass.class
11:17:26,260 INFO [STDOUT] ProjectRootClass: The project root was detected at /opt/jboss/jboss-5.0.0.Beta2/server/webapp/deploy/inear.ear/webapp.war
In both cases the base location is webapp.war directory (both the ear and war are exploded).
So it appears that if the ear and war are exploded that it should work (that is, the code should not be looking in the tmp or work files for the base.
So some more questions - where did the code you posted come from? I hope it did not come from a JSP! If it did, you might have to precompile the JSP and package it in the jar file, or put it in the classes directory. If the code is not from a JSP, then I need to see the output from the code, and the code that opens the properties file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113924#4113924
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113924
18 years, 4 months