[JBoss Seam] - Re: [2.0 beta1 CVS]SeamTest RARDeployment question
by enzhao
Now I see the jms-ds.xml in the bootstrap/deploy/messaging folder and the hsqlds-ds.xml in the bootstrap/deploy folder. And I also see jboss-beans.xml was removed from the configuration. Was the removal of jboss-beans.xml intentional or?
Gavin could you please tell me about these lines in the hsqlds-ds.xml:
| <!-- For in-process persistent db, saved when jboss stops.
| The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
| -->
| <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
|
1. Do I need to manually add the org.jboss.jdbc.HypersonicDatabase mbean? If so, in which file? Jboss-beans.xml or somewhere else?
2. How is the variable ${jboss.server.data.dir}$ passed to this file? I could not find the definition of the jboss.server.data.dir in the configuration files in the bootstrap folder. If I missed it, could you please tell me in which file is this variable defined?
3. Interestingly, although the SeamTest always failed on init(), but the bootstrap/data folder is already filled with data. (At the beginning it was just an empty folder) Any story about that?
Thank you very much in advance!!
Ellen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057811#4057811
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057811
18Â years, 10Â months
[JBoss Seam] - params in pageflows?
by Delphi's Ghost
What I'm trying to do is at the end of a pageflow, go back to the original page that started the page flow, in this case the widgetView page. To do so I need to pass the widgetId as a request parameter so the widgetView knows which widget to display.
I see from the xml schema that pageflows don't support params anywhere, and since I ended the pageflow, the conversation has completed, so there is no way to access that information.
Using pages.xml navigation, I can pass param values on the redirects. Should I just use pages.xml for my pageflow exit actions and end the conversation from there?
Anyone have any other suggestions on how to pass information out of the pageflow? Should I create a Jira to suggest the idea of params in pageflows?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057809#4057809
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057809
18Â years, 10Â months
[JBoss Seam] - Re: Migrate my current application to Seam?
by gavin.kingï¼ jboss.com
Of your possible choices I definitely don't recommend using stateless session beans everywhere. You should use an appropriate mix of stateless and stateful if you take the EJB route.
If you don't take the EJB route, you have a choice between Seam POJOs or Spring POJOs. In a JSF-based architecture, there is a compelling reason to choose Seam components: the contextual state management model is simply a much better fit to JSF, and the next rev of Java EE will include this model (the Web Beans spec).
So it comes down to session beans or not session beans. Your choice. Try out EJB3. If you like it, stick with it. If you don't, use plain Seam components. You can always change your mind later.
Note that there are a couple of problems for which you really do need EJB in Seam: eg. REQUIRES_NEW transactions and message-driven beans. However, you can always mix and match.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057808#4057808
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057808
18Â years, 10Â months
[JBoss Messaging] - Re: Selector Help needed - Possible alternative suggestions
by anhminh_tran
BTW here is the consumer that I made. It's a modification of the one that came with the example code:
| public class JMSConsumer {
|
| public static void main(String[] args) {
| String jndiDestinationName = "/queue/testQueue";
| InitialContext ic = null;
| Connection connection = null;
| boolean deployed = false;
|
| try {
| if (!Util.doesDestinationExist(jndiDestinationName)) {
| System.out.println("Destination " + jndiDestinationName + " does not exist, deploying it");
| Util.deployQueue(jndiDestinationName);
| deployed = true;
| }
|
| ic = new InitialContext();
| ic.addToEnvironment("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| ic.addToEnvironment("java.naming.provider.url", "jnp://10.5.1.241:1099");
| ic.addToEnvironment("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
|
| ConnectionFactory cf = (ConnectionFactory) ic.lookup("/ConnectionFactory");
| Queue queue = (Queue) ic.lookup(jndiDestinationName);
|
| connection = cf.createConnection();
| Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
|
| MessageConsumer consumer = session.createConsumer(queue);
|
| connection.start();
|
| System.out.println("Waiting for messages");
| System.out.println("--------------------");
| while (true) {
| TextMessage message = (TextMessage) consumer.receive(2000);
| if (message != null) {
| System.out.println("message=" + message.getText());
| System.out.println("-------------------------------");
|
| // Acknowledge that we've recieved and processed the message successfully
| message.acknowledge();
| Thread.sleep(15000);
| }
| }
| }
| catch (Exception e) {
| e.printStackTrace();
| }
| finally {
| try {
| if (deployed) {
| Util.undeployQueue(jndiDestinationName);
| }
| }
| catch (Exception e) {
| e.printStackTrace();
| }
|
| if (ic != null) {
| try {
| ic.close();
| }
| catch (Exception e) {
| e.printStackTrace();
| }
| }
|
| // ALWAYS close your connection in a finally block to avoid leaks
| // Closing connection also takes care of closing its related objects
| // e.g. sessions
| try {
| if (connection != null) {
| connection.close();
| }
|
| }
| catch (JMSException jmse) {
| System.err.println("Could not close connection " + connection + " exception was " + jmse);
| jmse.printStackTrace();
| }
| }
| }
|
| }
|
It seems that on the call to consumer.receive() it gets a batch of messages no matter if I set the PrefetchSize attribute to 1 or not..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057800#4057800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057800
18Â years, 10Â months