[JBoss Seam] - Re: Breadcrumbs
by Delphi's Ghost
In pages.xml, anytime you render the page, even as a result of a user interaction with a control (i.e. you are staying on the page), the stuff in pages.xml gets executed for the page each and everytime (for both page flow and conversation tags).The join=true just hides this fact since it tries to start a conversation on each re-render, but since one is already started, it just joins it.
Conversations started from <begin-conversation> in pages.xml must have the join=true, otherwise you get an error on re-renders due to starting a conversation from a long running conversation, or if nested=true, then you get multiple entries each time you render.
(Makes you wonder whether that was the plan, and if so, why include two attributes that can do nothing but blow up the application, unless there is a third option of doing a redirect as soon as you hit the page and start the conversation?)
It kind of makes conversation control in pages. xml useless. The only benefit it provides is for RESTful URLs so if the user opens a browser window, and enters the url, as soon as you hit that page it starts the conversation (without needing @Begin methods and so on). There are alternative ways of doing this though such as annotating a method in the main action bean for that page with @Create @Begin.
If you do have <begin-conversation> in pages.xml, set it as join=true, then, when you navigate through, you need to either put the conversation in the link, or call methods annotated with @Begin(nested=true) so they can pre-start the conversation that you will join when you get to the page and the <begin-conversation join=true> is invoked.
Of course, throw page flows into the mix, and things get really interesting, since then you need to start maintaining two sets of pageflow documents, one for the conversation in pages.xml, and one for your @Begin annotated conversations. At this point, you should probably just pick conversation control in methods and bag pages.xml.
At times, Seam seems to suffer from the tool developers myopia on some conversation/pageflow issues. However, it's still an improvement on doing it yourself!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046308#4046308
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046308
19 years
[Security & JAAS/JBoss] - Bad password error doesn't propagate to the client
by danlee
With JBoss 4.0.5 GA running under Windows 2003 server, I am using a ClientLoginModule on the client side and an LDAP provider (Active Directory) on the server side. When the client login password is wrong, the server report the error correctly in the server log.
2007-05-11 14:56:06,828 DEBUG [org.jboss.security.auth.spi.LdapExtLoginModule] Bad password for username=foo
javax.naming.NamingException: Search of baseDN(CN=Users,DC=paperwork2,DC=eng,DC=filenet,DC=com) found no matches
at org.jboss.security.auth.spi.LdapExtLoginModule.bindDNAuthentication(LdapExtLoginModule.java:379)
at org.jboss.security.auth.spi.LdapExtLoginModule.createLdapInitContext(LdapExtLoginModule.java:336)
at org.jboss.security.auth.spi.LdapExtLoginModule.validatePassword(LdapExtLoginModule.java:229)
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:210)
However, the client side gets the following error.
Caused by: java.io.NotSerializableException: com.sun.jndi.ldap.LdapCtx
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)
at java.lang.Throwable.writeObject(Throwable.java:648)
at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:299)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Is there a way to propagate the bad password error to the client from the server (EJB container)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046307#4046307
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046307
19 years
[EJB 3.0] - Deployment of ejb3 with webservice inside ear file
by webmarck
I have a project that contains some ejb3 session beans that is exposed as webservices using the annotations @WebService and @WebMethod.
I deploy the beans inside a ear file.
I currently run the code on JBoss 4.0.5 but (of course) would like to upgrade to JBoss 4.2.0GA to get the latest :-)
The funny part is that the project deploys smoothly on 4.0.5 but fails on 4.2.0 with
| 22:54:34,703 ERROR [ServiceEndpointDeployer] Cannot create service endpoint
| java.lang.ClassCastException: com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$5
| at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getBaseClass(ClassInfoImpl.java:170)
| at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:59)
| at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:39)
| at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:142)
| at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)
| at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)
| at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
| at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)
| at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)
| at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:22)
| at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:15)
| at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)
| at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)
| at java.util.AbstractList$Itr.next(AbstractList.java:422)
| ......
| ......
| 22:54:34,703 ERROR [ServiceEndpointPublisher] Cannot obtain waURL for: MyEar.ear/MyClient-.jar
|
I have a feeling that I only get the error when I deploy a webservice inside a ear file.
So my question is: Has anybody been able to deploy a session bean with webservice annotations on JBoss 4.2.0GA?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046306#4046306
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046306
19 years
[JBoss Seam] - Injecting properties using CRUD framework
by pdhaigh
Hi,
I am working with the CRUD framework, with everything configured in components.xml.
What I'm trying to add is the concept of last_updated_by - this is just a string that will be equal to #{identity.username}
I can do this fine for a new object:
| <factory name="vacancy" value="#{vacancyDAO.instance}" />
| <fwk:entity-home name="vacancyDAO"
| entity-class="com.example.model.Vacancy"
| new-instance="#{newVacancy}"/>
|
| <component name="newVacancy" class="com.example.model.Vacancy">
| <property name="last_updated_by">#{identity.username}</property>
| <property name="created_by">#{identity.username}</property>
| </component>
|
However, without extending entity-home and making a real class for the component, I'm at a bit of a loss of how to insert that #{identity.username} property to an existing object when calling vacancy.update.
Is there a way to do this? (I don't believe you can inject a property direct to a POJO Entity?)
cheers
phil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046304#4046304
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046304
19 years
[JBoss jBPM] - Re: org.hibernate.ObjectNotFoundException: No row with the g
by egoldfarb
We have a similar design and faced the same issue. It is follows the one in the wiki http://wiki.jboss.org/wiki/Wiki.jsp?page=JBPMJMS.
jBPM is wrapped by a web service which allows to begin a workflow and send signals. All actions send a JMS message to worker MDBs which perform the work asynchronously and signal back through the web service.
We also have some async steps which send a JMS message in the Delegate Action and go to a wait state. However, jBPM continues to do other work in other tokens (branches) and does not save the process instance before an MDB receives the message, does the work, and tries to signal back. That signal (which is executed in a different thread by the web service) tries to look up the process instance/token and fails.
As a workaround, we also put in some delay and retry logic into the MDB. A better solution IMO would be to make JMS and Hibernate transactions part of a distributed transaction (using XA); that way, JMS messages will not be sent ahead of the database commits. Our infrastructure (Database and Application Server) doesn't allow us to do that just yet.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046302#4046302
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046302
19 years