[JBoss JIRA] Created: (SEAMXML-12) Support complex initial values
by Jozef Hartinger (JIRA)
Support complex initial values
------------------------------
Key: SEAMXML-12
URL: https://jira.jboss.org/browse/SEAMXML-12
Project: Seam XML Bean Config
Issue Type: Feature Request
Affects Versions: 3.0.0.Alpha2
Reporter: Jozef Hartinger
Assignee: Stuart Douglas
Currently, setting the value of a field is limited to the following basic types: {primitives, Date, Calendar, Enum, Class}. This is not enough for complex cases.
It would be great if any class instance could be configured via XML extension and injected into a field.
Here is an example
public class Car {
private String color;
// getters and setters
}
@ApplicationScoped
public class Garage {
private Set<Car> cars
// getters and setters
}
The garage bean could be configured the following way:
<p:Garage>
<s:overrides />
<p:cars>
<s:value>
<p:Car color="blue" />
</s:value>
<s:value>
<p:Car color="red" />
</s:value>
</p:cars>
</p:Garage>
or maybe even:
<p:Garage>
<s:overrides />
<p:cars>
<p:Car color="blue" />
<p:Car color="red" />
</p:cars>
</p:Garage>
I can see the execution steps as:
1) Check that Car is a dependent-scoped component
2) For each element inside p:cars
a) obtain a (dependent) Car instance from BeanManager
b) set properties of the Car instance
c) garage.add(car)
This is a different approach to configuration compared what the XML extension provides so far. While it is currently possible to configure beans, if this feature request is implemented, it will be possible to configure bean instances separately and use these instances to configure a bean.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (SEAMXML-4) cannot initiate generic collection
by Jozef Hartinger (JIRA)
cannot initiate generic collection
----------------------------------
Key: SEAMXML-4
URL: https://jira.jboss.org/jira/browse/SEAMXML-4
Project: Seam XML Bean Config
Issue Type: Bug
Environment: 3.0.0-SNAPSHOT
Reporter: Jozef Hartinger
I am using the following xml configuration
<test:BasicConfiguration>
<s:overrides/>
<test:resources>
<s:value>org.jboss.seam.resteasy.example.TestResource</s:value>
</test:resources>
</test:BasicConfiguration>
to setup the following collection
private Set<Class<?>> resources;
and I am getting the following exception (Note that it work OK if i use private Set<Class> resources)
11:31:45,354 ERROR [STDERR] java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
11:31:45,355 ERROR [STDERR] at org.jboss.seam.xml.fieldset.CollectionFieldSet.discoverElementType(CollectionFieldSet.java:81)
11:31:45,355 ERROR [STDERR] at org.jboss.seam.xml.fieldset.CollectionFieldSet.<init>(CollectionFieldSet.java:42)
11:31:45,355 ERROR [STDERR] at org.jboss.seam.xml.model.FieldXmlItem.resolveChildren(FieldXmlItem.java:105)
11:31:45,355 ERROR [STDERR] at org.jboss.seam.xml.model.ModelBuilder.resolveNode(ModelBuilder.java:208)
11:31:45,355 ERROR [STDERR] at org.jboss.seam.xml.model.ModelBuilder.resolveNode(ModelBuilder.java:204)
11:31:45,356 ERROR [STDERR] at org.jboss.seam.xml.model.ModelBuilder.build(ModelBuilder.java:86)
11:31:45,356 ERROR [STDERR] at org.jboss.seam.xml.bootstrap.XmlExtension.beforeBeanDiscovery(XmlExtension.java:94)
11:31:45,356 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:31:45,356 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:31:45,356 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:31:45,356 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
11:31:45,357 ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
11:31:45,357 ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
11:31:45,357 ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
11:31:45,357 ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
11:31:45,358 ERROR [STDERR] at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:112)
11:31:45,358 ERROR [STDERR] at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
11:31:45,358 ERROR [STDERR] at org.jboss.seam.xml.bootstrap.XmlExtension_$$_javassist_150.beforeBeanDiscovery(XmlExtension_$$_javassist_150.java)
11:31:45,358 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:31:45,359 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:31:45,359 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:31:45,360 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
11:31:45,360 ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
11:31:45,360 ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
11:31:45,360 ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
11:31:45,366 ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
11:31:45,366 ERROR [STDERR] at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:219)
11:31:45,366 ERROR [STDERR] at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
11:31:45,366 ERROR [STDERR] at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:179)
11:31:45,366 ERROR [STDERR] at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:231)
11:31:45,366 ERROR [STDERR] at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:206)
11:31:45,367 ERROR [STDERR] at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:88)
11:31:45,367 ERROR [STDERR] at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:52)
11:31:45,367 ERROR [STDERR] at org.jboss.weld.bootstrap.events.BeforeBeanDiscoveryImpl.fire(BeforeBeanDiscoveryImpl.java:66)
11:31:45,367 ERROR [STDERR] at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:359)
11:31:45,367 ERROR [STDERR] at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:121)
11:31:45,368 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:31:45,369 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:31:45,369 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:31:45,369 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
11:31:45,369 ERROR [STDERR] at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
11:31:45,369 ERROR [STDERR] at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:151)
11:31:45,369 ERROR [STDERR] at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
11:31:45,370 ERROR [STDERR] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257)
11:31:45,370 ERROR [STDERR] at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
11:31:45,370 ERROR [STDERR] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125)
11:31:45,370 ERROR [STDERR] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
11:31:45,370 ERROR [STDERR] at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202)
11:31:45,370 ERROR [STDERR] at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
11:31:45,370 ERROR [STDERR] at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
11:31:45,371 ERROR [STDERR] at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
11:31:45,371 ERROR [STDERR] at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
11:31:45,371 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
11:31:45,371 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
11:31:45,371 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
11:31:45,371 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
11:31:45,372 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
11:31:45,372 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
11:31:45,372 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
11:31:45,372 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:873)
11:31:45,372 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:620)
11:31:45,372 ERROR [STDERR] at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:180)
11:31:45,373 ERROR [STDERR] at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58)
11:31:45,373 ERROR [STDERR] at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
11:31:45,373 ERROR [STDERR] at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
11:31:45,373 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
11:31:45,373 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1660)
11:31:45,373 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
11:31:45,374 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1399)
11:31:45,374 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
11:31:45,374 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
11:31:45,374 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
11:31:45,374 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
11:31:45,374 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
11:31:45,374 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
11:31:45,375 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
11:31:45,375 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
11:31:45,375 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
11:31:45,375 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
11:31:45,375 ERROR [STDERR] at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
11:31:45,375 ERROR [STDERR] at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
11:31:45,376 ERROR [STDERR] at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
11:31:45,376 ERROR [STDERR] at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
11:31:45,376 ERROR [STDERR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
11:31:45,376 ERROR [STDERR] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
11:31:45,376 ERROR [STDERR] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
11:31:45,376 ERROR [STDERR] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
11:31:45,377 ERROR [STDERR] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
11:31:45,377 ERROR [STDERR] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
11:31:45,377 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
11:31:45,377 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
11:31:45,377 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
--
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
13 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4248) Messages component gets wrong locale in when called with seam remoting (@WebRemote)
by David Jensen (JIRA)
Messages component gets wrong locale in when called with seam remoting (@WebRemote)
-----------------------------------------------------------------------------------
Key: JBSEAM-4248
URL: https://jira.jboss.org/jira/browse/JBSEAM-4248
Project: Seam
Issue Type: Bug
Components: Remoting
Affects Versions: 2.1.2.GA
Environment: Seam 2.1.2.GA, JBoss EAP 4.3
Reporter: David Jensen
Assignee: Shane Bryzak
The wrong locale gets set when using the 'Messages' component in a @WebRemote method called from javascript. Regardless of supported and default locales in faces-config.xml whatever the browser requests is used.
I'll attach a clean project with code example. Basically I hunted it down to org.jboss.seam.international.LocaleSelector.getLocale() where we get the locale from the HttpRequest since no FacesContext exists.
It would seem you can only have supported and default locales in a ordinary JSF request, It would be nice if Seam could keep of track that for you instead of JSF, or have I misunderstood something?
Thanks!
/David
--
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
13 years, 9 months
[JBoss JIRA] Created: (JBSEAM-4655) Custom EntityIdentifierStrategy ignored by IdentifierPolicy
by Robert Raksi (JIRA)
Custom EntityIdentifierStrategy ignored by IdentifierPolicy
-----------------------------------------------------------
Key: JBSEAM-4655
URL: https://jira.jboss.org/browse/JBSEAM-4655
Project: Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.2.0.GA
Reporter: Robert Raksi
I tried to set a custom identifier strategy for one of my entities with the @Identifier annotation but after debuging the IdentifierPolicy class I found that my custom strategy is neglected in favor of the builtin EntityIdentifierStrategy.
Inside the if (strategy == null) {} block my strategy is found and put into the strategies map as expected but then in the for statement it's replaced with de default one. Shouldn't the for statement be in an else block?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (JBSEAM-4659) RememberMe fails to add Cookie because of invalid Base64 encoding
by Florian Specker (JIRA)
RememberMe fails to add Cookie because of invalid Base64 encoding
-----------------------------------------------------------------
Key: JBSEAM-4659
URL: https://jira.jboss.org/browse/JBSEAM-4659
Project: Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.2.0.GA
Reporter: Florian Specker
RememberMe.encodeToken() uses Base64 to encode Cookie values before actually adding the Cookie. For long usernames, a newline char (\n) is inserted, preventing the Cookie from being added.
JBREM-806 addressed the same issue for JBoss remoting:
[..]
---------
Solution: org.jboss.util.Base64.encodeBytes() takes an optional "options" parameter, which, among other things, can indicate that Base64 encoded strings should not be broken into lines:
change
String encoded = Base64.encodeBytes(buffer.toString().getBytes());
to
String encoded = Base64.encodeBytes(buffer.toString().getBytes(), Base64.DONT_BREAK_LINES);
[..]
As a workaround, I subclassed RememberMe and overwrote encodeToken():
@Override
protected String encodeToken(String username, String value) {
StringBuilder sb = new StringBuilder();
sb.append(username);
sb.append(":");
sb.append(value);
// do not break lines - this results in invalid cookies
return Base64.encodeBytes(sb.toString().getBytes(), Base64.DONT_BREAK_LINES);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months