[EJB 3.0] - Re: HQL/ JPA-QL Query Tuning: How to enforce the join order
by oskar.carlstedt
anonymous wrote : This is just sick disgusting rubbish! Who ever invented that stuff - fire him!
|
No, sorry, this is not "sick disgusting rubbish". As a matter of fact, the join order is of importance for many databases. One can think that a databse's execution planner should fix this, but some of them aren't.
Ok, why is the order of importance. When joining the same table with different other tables one get subsets of data that in turn will be joined again etc.
In this example whe have T1, T2 and T3. Let say a join between T1 and T2 gives 1.000.000 records in return and a join between T1 and T3 gives 1000 records in returns. Of course it is better to do the T1 and T3 join before and the make a join between result of (T1, T3) and T2. It will speed up a lot because you are cutting off most of the records in the first join.
With kind regards
Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043081#4043081
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043081
18 years, 12 months
[JBoss Getting Started Documentation] - Bank example build error
by JasonHsu
I got the sample, http://www.jboss.com/index.html?module=downloads&op=download&downloadId=60 and unzip jbossj2ee-src.zip then tried follow the step 4.1.2 in the Getting Started Guild to compile the source of ebank:
ant -f jboss-build.xml compile
I got the following errors:(only part of the errors are listed as the following)
| compile:
| [javac] Compiling 5 source files to C:\Buff\jbossj2ee-sample\examples\bank\b
| uild
| [javac] C:\Buff\jbossj2ee-sample\examples\bank\src\com\jboss\ebank\TellerBea
| n.java:16: package com.sun.ebank.ejb.account does not exist
| [javac] import com.sun.ebank.ejb.account.AccountController;
| [javac] ^
| [javac] C:\Buff\jbossj2ee-sample\examples\bank\src\com\jboss\ebank\TellerBea
| n.java:17: package com.sun.ebank.ejb.account does not exist
| [javac] import com.sun.ebank.ejb.account.AccountControllerHome;
| [javac] ^
| [javac] C:\Buff\jbossj2ee-sample\examples\bank\src\com\jboss\ebank\TellerBea
| n.java:18: package com.sun.ebank.util does not exist
| [javac] import com.sun.ebank.util.AccountDetails;
| [javac] ^
| [javac] C:\Buff\jbossj2ee-sample\examples\bank\src\com\jboss\ebank\TellerBea
| n.java:26: cannot find symbol
| [javac] symbol : class AccountController
| [javac] location: class com.jboss.ebank.TellerBean
| [javac] private AccountController getController()
| [javac] ^
| [javac] C:\Buff\jbossj2ee-sample\examples\bank\src\com\jboss\ebank\web\Custo
| merHackFilter.java:5: package com.sun.ebank.util does not exist
| [javac] import com.sun.ebank.util.Debug;
| [javac] ^
| .......
|
|
| Then I browse to the directory of bank\src. I found that there are only five .java files at
| com/jboss/ebank/AccountList.java
| com/jboss/ebank/TellerBean.java
| com/jboss/ebank/TellerEndpoint.java
| com/jboss/ebank/WSClient.java
| com/jboss/ebank/web/CustomerHackFilter.java
|
| I don't see the package of com.sun.ebank.ejb.account or com.sun.ebank.util as the complie error shows.
|
| Did I miss something? or where I can get the sample with all files?
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043076#4043076
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043076
18 years, 12 months
[JBoss Seam] - Re: Nested conversations and transaction management
by christian.bauer@jboss.com
anonymous wrote :
| 1) Can you give me some reference to learn more about transactions that span HTTP requests ?
|
This is extremely rare, it involves suspension of the transaction on a Java EE server. I'd rather not give you any references on this because you will certainly try it - without understanding why you (don't) need it. Forget that I even mentioned it :)
anonymous wrote :
| 2) Can @Begin(flushMode=MANUAL) help me ?
|
Of course, the unflushed persistence context can be held for several requests and is then flushed in the last request of a conversation. This is the basic conversational programming model in Seam, widely documented.
anonymous wrote :
| 3) Why seam has not options that let user manage the transactions as needed ? Am I using seam in the wrong way ?
|
Yes, you have a fuzzy picture about what system transactions are and now look for the wrong solutions. Seam and Java EE have _all_ options you need to handle transactions. Don't jump into the middle trying to use nested conversations, long-running persistence contexts, and complex EJB/transaction assemblies, without understanding the basics first.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043070#4043070
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043070
18 years, 12 months
[Messaging, JMS & JBossMQ] - Re: java.lang.ClassCastException
by vermanaveen
Based on the suggestions, I did all suggested changed. Now I am getting javax.naming.NameNotFoundException: jms not bound
Infact, can you please suggest how do I create my own connection factory? I have my MDB
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
|
| <ejb-jar>
| <enterprise-beans>
| <message-driven>
| <ejb-name>MQManager</ejb-name>
| <ejb-class>com.ebw.ejb.mdb.MQManager</ejb-class>
| <transaction-type>Container</transaction-type>
| <message-selector>
| <![CDATA[
| Message_Redirector IS NULL AND Message_Type <> 'Data'
| ]]>
| </message-selector>
| <message-driven-destination>
| <destination-type>javax.jms.Queue</destination-type>
| </message-driven-destination>
| <resource-ref> <res-ref-name>jms/novaJMSConnectionFactory</res-ref-name>
| <res-type>javax.jms.QueueConnectionFactory</res-type>
| <res-auth>Container</res-auth>
| </resource-ref>
|
| <security-identity>
| <run-as>
| <role-name>admin</role-name>
| </run-as>
| </security-identity>
| </message-driven>
| </enterprise-beans>
| <assembly-descriptor>
| <security-role>
| <description>Administrator</description>
| <role-name>admin</role-name>
| </security-role>
| <container-transaction>
| <method>
| <ejb-name>MQManager</ejb-name>
| <method-name>*</method-name>
| </method>
| <trans-attribute>NotSupported</trans-attribute>
| </container-transaction>
| </assembly-descriptor>
| <ejb-client-jar>novaEJBClient.jar</ejb-client-jar>
| </ejb-jar>
|
Also find my jboss.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
| <!-- jboss xml used on for JBoss deployement-->
|
| <jboss>
| <enterprise-bean>
| <message-driven>
| <ejb-name>MQManager</ejb-name>
| <!--
| @Naveen: commented for the time being
| <pool>
| <instance-pool>15</instance-pool>
| </pool>
| -->
| <destination-jndi-name>jms/novaRequestQueue</destination-jndi-name>
| <resource-ref>
| <res-ref-name>jms/novaJMSConnectionFactory</res-ref-name>
| <res-type>javax.jms.QueueConnectionFactory</res-type>
| <jndi-name>QueueConnectionFactory</jndi-name>
| </resource-ref>
|
| </message-driven>
| </enterprise-bean>
|
| <security-role-assignment>
| <role-name>admin</role-name>
| <principal-name>server</principal-name>
| </security-role-assignment>
| </jboss>
|
My client code reads MQ.properties which are defined as below.
|
| # Intial factory
| java.naming.factory.initial org.jnp.interfaces.NamingContextFactory
|
| # Provider URL
| #java.naming.provider.url t3://192.168.2.227:7001
| java.naming.provider.url jnp://localhost:1099
|
| #java.naming.provider.url t3://novps1.nj.ssmb.com:7001
|
|
| # Queue Connection Factory
| queue.connection.factory jms/novaJMSConnectionFactory
| #Based on suggestion; http://www.jboss.com/index.html?module=bb&op=viewtopic&t=107646
| #queue.connection.factory ConnectionFactory
|
|
| # Request Queue
| request.queue.context.name jms/novaRequestQueue
| #request.queue.context.name queue/B
|
|
| # Response Queue
| response.queue.context.name jms/novaResponseQueue
| #response.queue.context.name queue/novaResponseQueue
|
| #Strategy to pick one server out of the available list of servers. ['sequential', 'random'] 'sequential' is default.
| server.selection.strategy sequential
|
| #Security principal
| java.naming.security.principal client
|
| # Security credentials (password)
| java.naming.security.credentials client123
|
| # Maximum chars allowed in a single message
| max.chars.in.message 1500000
|
| # Time in milliseconds, The listener must wait for the response.
| response.wait.time 300000
|
| # Time in milliseconds, for which the queue connection is maintain(should be more than 'response.wait.time').
| queue.connection.lease.time 600000
|
| # Time in minutes, The time after witch session will expire [default value is 24hrs].
| session.expire.time 1440
|
| # ON/OFF debug information on the system output stream. ['on', 'off']
| mq.debug.state off
|
| # Set the debug leval [0, 1, 2 or 3] use largest value for maximum debug information, zero to turn off.
| debug.level 3
|
| # Property file to store transaction information.
| transaction.file Transaction.properties
|
| # ON/OFF lazy loading of Entity beans. ['on', 'off']
| lazy.mode off
|
| # ON/OFF workflow rules. ['on', 'off']
| workflow off
|
| # Whether connection to excel is to be done.['on', 'off']
| excel.integration on
|
I am getting frustrating. Please help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043069#4043069
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043069
18 years, 12 months