[JBoss Tools (users)] - Re: usage of visual edittor for jsf / seam pages
by mwr0707
It's been a few years, so I don't have source. But for our purposes, (and understanding that RichFaces is not going to provide everything you get with Swing/SWT) consider the JBoss server management view which appears when you double-click a configured JBoss server in Web Development perspective. Now imagine that the Deployment panel contained another panel. The panel nesting allows you to simplify the layout configuration. In Swing, trying to layout too many components in a single GridBag is quite frustrating. On the other hand, using multiple nested panels to manage layout is very difficult to visualize by looking at the source. So the visual editor really adds great value here.
The concept is simply this:
It applies to any "visual" container:
In the visual editor window, when you double-click on a panel, the contents of the editor window "zooms" to just the panel you selected. All of the components in the enclosing container are no longer visible. The entire visual editor window shows only that panel. If this panel contains a nested panel, you can double-click on it to drill-down further, and then that panel fills the entire visual editor window. Of course, you can drill-back up to the enclosing container at any time.
In complex layouts which almost always require nested panels in Swing, this makes it very easy to select and move the desired components.
I assume that as you add layout support e.g. a4j:outputPanel, etc., users will attempt (as they would with Swing) a more visual (drag-and-drop, or click component in visual pane, then adjust properties view) style of development. Without drilldown into complex panels, it can be difficult to click on the specific component you want. This was one of my frustrations with the early Eclipse Swing visual editor as compared to netbeans.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199854#4199854
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199854
17 years, 3 months
[Persistence, JBoss/CMP, Hibernate, Database] - JPA Entity attached scope?
by Sanjuro
Hi,
I'm using JBoss 5.0 with JPA for storing my data in a database. However at some point in my code my entities become detached from the persistence context when passing them to a different class.
When exactly do entities get detached? Outside the method scope they were created in? Outside the class? Outside the JAR file they were created in? Or maybe when traversing a remote interface?
More specific: I have an entity which looks like this:
| @Entity
| public class Customer implements java.io.Serializable {
| @Id
| private Long Id;
| private String firstName;
| [...]
| }
|
And a interface to retrieve the entity:
| @Remote
| public interface CustomerDBAO {
| public Customer get(Long customerId);
| [...]
| }
|
And of course a EJB to implement the interface:
| @Stateless
| public class CustomerDBAOBean implements CustomerDBAO {
| public Customer get(Long customerId) {
| return em.find(Customer.class, customerId);
| }
| [...]
| }
|
All three are in data.jar. Then in ejb.jar with a class which retrieves the entity:
| @Stateless
| public class CustomerFacadeBean {
| @EJB
| CustomerDBAO customerDBAO;
| [...]
| }
|
In the CustomerFacadeBean the Customer entity is detached. What do I need to change to make sure the entity stays attached? Put all classes in the same package? Change to a local interface? Or move the method to the CustomerDBAO class?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199852#4199852
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199852
17 years, 3 months
[JBoss jBPM] - Unlock jobs, maxLockTime, fault tolerance
by jjrs
Hi,
I have been looking for references and some explanation about "maxLockTime" however the only post I have found is this one although I didn't find the answer to my questions there.
Is this parameter ever used ?
I haven't been able to find where the LockMonitorThread is started, therefore I believe it's never used, and the jobs in some situations are never unlocked.
The scenario that we have is:
* two different machines running one JobExecutor each (with several threads).
* the workflow definition is made up of async nodes and actions (parallel processing).
In case one instance (machine) stops working, the other one should pick up the work load of the other. After doing some tests I have seen that the job appears in the database lock by the JobExecutor and threads from one of the machines, and that job won't be unlocked (and therefore executed) by any JobExecutor thread running in the other machine. I thought that I could modify the code for starting the thread LockMonitorThread instead of just creating it, but if I try to start the thread I get a hibernate exception saying that the JobSession.findJobsWithOverdueLockTime query is missing, and the Jira ticket JBPM-1158 shows it as a pending issue.
I don't know if I am missing something or if it's just I don't understand the way maxLockTime, LockMonitorThread, etc... work.
I would appreciate any help.
Thanks.
Jose
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199844#4199844
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199844
17 years, 3 months
[JBoss Messaging] - Re: JBM Topic Pub-Sub
by timfox
No, that's not how JMS durable subscriptions work. There are quite a few good JMS tutorials out there which should go through this.
In short:
| MessageConsumer consumer = session.createDurableSubscriber(myTopic, "foo"); //Creates the durable subscription and returns a consumer on it
|
| consumer.close() //Closes the consumer but the subscription is still active and receiving messages - you can close down the whole client at this point.. then.. some time later:
|
| consumer = session.createDurableSubscriber(myTopic, "foo"); //Does not create a new durable sub since it already exists - but just returns a consuimer on it.
|
| consumer.close() // closes the consumer - the subscription is still alive
|
| session.unsubscribe("foo") // that's how you delete it - notice you've already closed the consumer/
|
HTH
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199840#4199840
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199840
17 years, 3 months