[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4393) seam-gen produces wrong persistence unit configuration for unit tests
by Christian Bauer (JIRA)
seam-gen produces wrong persistence unit configuration for unit tests
---------------------------------------------------------------------
Key: JBSEAM-4393
URL: https://jira.jboss.org/jira/browse/JBSEAM-4393
Project: Seam
Issue Type: Bug
Reporter: Christian Bauer
Assignee: Dan Allen
I've just generated a seam-gen project from 2.2 head and added a unit test. The test setup is wrong in build.xml:
<target name="buildtest" depends="init,compiletest,copytestclasses" description="Build the tests">
<copy todir="${test.dir}">
<fileset dir="${basedir}/resources">
<exclude name="META-INF/persistence*.xml"/>
<exclude name="import*.sql"/>
<exclude name="${project.name}-*-ds.xml"/>
<exclude name="components-*.properties"/>
</fileset>
<fileset dir="${basedir}/view"/>
</copy>
<copy tofile="${test.dir}/META-INF/persistence.xml"
file="${basedir}/resources/META-INF/persistence-test.xml"/>
<copy tofile="${test.dir}/import.sql"
file="${basedir}/resources/import-test.sql"/>
<!-- Wrong!
<copy tofile="${test.dir}/components.properties"
file="${basedir}/resources/components-test.properties"/>
-->
<!-- Fix! -->
<copy tofile="${test.dir}/components.properties"
file="${basedir}/resources/components-test.properties">
<filterset >
<filter token="puJndiName" value="java:/${project.name}EntityManagerFactory"/>
</filterset>
</copy>
<copy todir="${test.dir}" flatten="true">
<fileset dir="${src.test.dir}">
<include name="**/*Test.xml" />
</fileset>
</copy>
</target>
The components.properties had hardcoded values for persistence unit configuration, which were wrong. I've added this filter to build.xml and modified the components-test.properties:
# These properties are used to replace Ant-style tokens in the component descriptor (components.xml) at runtime.
jndiPattern=#{ejbName}/local
debug=true
seamBootstrapsPu=true
# Wrong!
#seamEmfRef=#{entityManagerFactory}
#puJndiName=#{null}
# Fix!
seamEmfRef=#{null}
puJndiName=@puJndiName@
Also, the readme.txt in the generated test folder doesn't mention that this Ant target has to run before you run the tests in the IDE and that you have to add the ${test.dir} folder to your classpath and NOT create a module dependency on your core application build output classpath etc. I don't know how that works in Eclipse but in IntelliJ I had to create a separate module with a completely separate list of classpath entries, and enable the 'buildtest' Ant target before the test suite runs.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3946) LdapIdentityStore can not use backup server (failover)
by Raimund Hölle (JIRA)
LdapIdentityStore can not use backup server (failover)
------------------------------------------------------
Key: JBSEAM-3946
URL: https://jira.jboss.org/jira/browse/JBSEAM-3946
Project: Seam
Issue Type: Feature Request
Components: Security
Affects Versions: 2.1.1.GA, 2.1.1.CR2, 2.1.1.CR1, 2.1.0.SP1
Reporter: Raimund Hölle
Since LdapIdentityStore assembles the provider URL internally, it is not possible to use extended URL's, e. g., a primary and a backup server like this:
env.setProperty(Context.PROVIDER_URL, "ldap://srv01:389 ldap://srv02:389");
It would be nice if we would be able to set the providerUrl directly. For compatibility reasons, i suggest the following change:
// new property settable from components.xml
private String providerUrl = null;
protected final InitialLdapContext initialiseContext(String principal, String credentials) throws NamingException {
...
String url = providerUrl;
if (url == null || url.equals("")) {
url = String.format("ldap://%s:%d", getServerAddress(), getServerPort());
}
env.setProperty(Context.PROVIDER_URL, url);
...
Additionally it would be nice if initialiseContext() wouldn't be final so we are able to extend the class.
Regards,
Raimund
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4455) Seamspace -- incorrect viewIds lead to missing page parameter propagation
by Wolfgang Schwendt (JIRA)
Seamspace -- incorrect viewIds lead to missing page parameter propagation
--------------------------------------------------------------------------
Key: JBSEAM-4455
URL: https://jira.jboss.org/jira/browse/JBSEAM-4455
Project: Seam
Issue Type: Bug
Components: Examples
Affects Versions: 2.2.0.GA
Environment: Seam 2.2 Rev. 11569 http://anonsvn.jboss.org/repos/seam/branches/community/Seam_2_2
Reporter: Wolfgang Schwendt
Priority: Trivial
When s:link and s:button are used in the facelets view template files of the Seamspace example,
the JSF viewId to link to is written incorrectly.
Right now in the Seamspace example, the viewId to link to is written as follows:
s:link view="/friendrequest.seam" value="Send a friend request" propagation="none"...
Instead of using the suffix/extension ".seam", the viewId to link to must be correctly written with the suffix/extension ".xhtml":
s:link view="/friendrequest.seam" value="Send a friend request" propagation="none"...
If ".seam" is used rather than ".xhtml", it leads to the missing propagation of page parameters. When an s:link/s:button is rendered, UISeamCommandBase.getUrl() retrieves the set of page parameters from Pages.getStringValuesFromModel(). The Pages component holds metadata for pages defined in pages.xml, including page parameters. When the wrong viewId is used, Pages.getStringValuesFromModel() does not find the page parameters for the JSF view to link to, and therefore page parameters are omitted when rendering the link. For example, when the viewID is written with '.seam', the link for sending a friend request is rendered with the target URL http://127.0.0.1:8080/seamspace/friendrequest.seam, but it should be http://127.0.0.1:8080/seamspace/friendrequest.seam?name=shadowman
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2292) Resources from resource servlet can't be re-rendered
by Christian Bauer (JIRA)
Resources from resource servlet can't be re-rendered
----------------------------------------------------
Key: JBSEAM-2292
URL: http://jira.jboss.com/jira/browse/JBSEAM-2292
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Reporter: Christian Bauer
Found this after using the captcha:
<div class="input">
<a:region>
<s:validateAll>
<h:graphicImage value="/seam/resource/captcha" style="vertical-align:text-bottom;"/>
<h:inputText tabindex="1" size="6" maxlength="6" required="true" id="verifyCaptcha" value="#{captcha.response}">
<a:support status="#{statusId}" event="onblur" reRender="verifyCaptchaEntry"/>
</h:inputText>
</s:validateAll>
</a:region>
</div>
This is a re-rendered s:decorate form field, so that onblur we get a new challenge (if the captcha repsonse was wrong). However, the graphicImage is not reloaded from the server, the browser caches it. To prevent browser caching, this is a quick hack:
<div class="input">
<a:region>
<s:validateAll>
<h:graphicImage value="/seam/resource/captcha?nocache=#{wiki:generateRandomNumber()}" style="vertical-align:text-bottom;"/>
<h:inputText tabindex="1" size="6" maxlength="6" required="true" id="verifyCaptcha" value="#{captcha.response}">
<a:support status="#{statusId}" event="onblur" reRender="verifyCaptchaEntry"/>
</h:inputText>
</s:validateAll>
</a:region>
</div>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years