SetRollbackOnly doesn't work on Container Managed MDB

I have a Container Managed Message Driven Bean + an AQ Queue.
In my onMessage, I call the messageContext.setRollbackOnly() but my message is removed from the queue!
Is it the expected behavior??? It seems that there is a problem with the transactions (for container managed bean)!
I am using oc4j 9.0.3 build 020725.1695 and oracle db 9.0.1.3 with the patch 2416054.
Here is ejb-jar.xml :
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<enterprise-beans>
<message-driven>
     <ejb-name>test</ejb-name>
     <ejb-class>myPackage.MyMdb</ejb-class>
     <transaction-type>Container</transaction-type>
     <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
     <message-driven-destination>
          <destination-type>javax.jms.Queue</destination-type>
     </message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>test</ejb-name>
<method-name>onMessage</method-name>
</method>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Laurent Lopez

Laurent -- You cannot use "RequiresNew" as the trans-attribute for your MDB. You would use "Required". Here is an excerpt from section 15.4.7 of the EJB 2.0 spec.
The onMessage method is invoked in the scope of a transaction determined by the transaction
attribute specified in the deployment descriptor. If the bean is specified as using container-managed
transaction demarcation, either the Required or the NotSupported transaction attribute must be
used.[26]
When a message-driven bean using bean-managed transaction demarcation uses the javax.transaction.
UserTransaction interface to demarcate transactions, the message receipt that causes
the bean to be invoked is not part of the transaction. If the message receipt is to be part of the transaction,
container-managed transaction demarcation with the Required transaction attribute must be
used.
Thanks -- Jeff

Similar Messages

  • Distributed transactions with container-managed MDBs

              I have built a framework that employs a high rate of code reuse while abstracting
              the complexities of inter-application communication. This allows application
              developers to focus on solving their business needs and not worry about "the plumbing"
              between the applications.
              At this point, the framework is using container-managed MDBs for Topic destinations.
              MDBs were chosen because of their concurrent nature for processing JMS messages.
              Now that I have this framework up and running, I am trying to add distributed
              transaction support and am having trouble understanding what I need to do. Here
              is how the framework works:
              The MDB will recieve a message, unmarshall it into a business object, and then
              route that object to the appropriate business class where it is then processed
              accordingly. In most cases, the processing of this message object will require
              database interaction. If any error should occur while processing the message,
              all XAResources within the transaction should rollback and ultimately, the JMS
              message will be redelivered later.
              Here is what I'm trying to find out:
              1. When control is passed to an application and it gets a DB connection, will
              that DB resource be dynamically enlisted with the transaction?
              2. Must the DB connection come from the WLS DB pool to be enlisted with the transaction?
              I ask this because the current standard at this company is to use a home-grown
              DB connection pool for getting DB connections. This is due to the fact that not
              all applications here run in a WLS environment and they wanted a standard way
              of retrieving a DB connection across applications. They also sited problems with
              WLS 4.5.1 connection pool.
              3. The documentation states that only one database may be involved in a transaction.
              If a connection to another database is required, but not needed in the current
              transaction, will WLS ignore enlisting the 2nd DB resource, or throw an exception?
              4. Where can I find <B>detailed</B> information about this subject? Everything
              that I have read so far has barely scratched the surface for this specific topic.
              Thanks,
              Bob.
              

              Hi Bob,
              If you are using WLS's XA connection pool, then the XAResource associated with
              the XA connections are enlisted with the transaction transparently for you. Enlistments
              actually occur not at getConnection, but on demand when the JDBC objects are actually
              used.
              If you are not using WLS connection pools, then you would need to enlist the XAResource
              associated with the XA connections yourself. You can obtain the transaction associated
              with the current thread by calling weblogic.transaction.TxHelper.getTransaction(),
              and then call enlistResource on the transaction.
              Weblogic has provisions that allow one (and only one) non-XA connection pool to
              participate in a distributed transaction. In this case, you will get a SQLException
              when you try to obtain a connection from a second connection pool in the same
              distributed transaction. However, if you are using real XA connection pools,
              there is no limitation and any number of XA connection pools can participate in
              the same distributed transaction.
              We will try to incorporate more info in our online docs in the future.
              -- Priscilla Fung, BEA Systems, Inc.
              "Bob Peroutka" <[email protected]> wrote:
              >
              >I have built a framework that employs a high rate of code reuse while
              >abstracting
              >the complexities of inter-application communication. This allows application
              >developers to focus on solving their business needs and not worry about
              >"the plumbing"
              >between the applications.
              >
              >At this point, the framework is using container-managed MDBs for Topic
              >destinations.
              > MDBs were chosen because of their concurrent nature for processing JMS
              >messages.
              >
              >Now that I have this framework up and running, I am trying to add distributed
              >transaction support and am having trouble understanding what I need to
              >do. Here
              >is how the framework works:
              >
              >The MDB will recieve a message, unmarshall it into a business object,
              >and then
              >route that object to the appropriate business class where it is then
              >processed
              >accordingly. In most cases, the processing of this message object will
              >require
              >database interaction. If any error should occur while processing the
              >message,
              >all XAResources within the transaction should rollback and ultimately,
              >the JMS
              >message will be redelivered later.
              >
              >Here is what I'm trying to find out:
              >
              >1. When control is passed to an application and it gets a DB connection,
              >will
              >that DB resource be dynamically enlisted with the transaction?
              >
              >2. Must the DB connection come from the WLS DB pool to be enlisted with
              >the transaction?
              >
              >I ask this because the current standard at this company is to use a home-grown
              >DB connection pool for getting DB connections. This is due to the fact
              >that not
              >all applications here run in a WLS environment and they wanted a standard
              >way
              >of retrieving a DB connection across applications. They also sited problems
              >with
              >WLS 4.5.1 connection pool.
              >
              >3. The documentation states that only one database may be involved in
              >a transaction.
              > If a connection to another database is required, but not needed in the
              >current
              >transaction, will WLS ignore enlisting the 2nd DB resource, or throw
              >an exception?
              >
              >4. Where can I find <B>detailed</B> information about this subject?
              > Everything
              >that I have read so far has barely scratched the surface for this specific
              >topic.
              >
              >Thanks,
              >
              >Bob.
              

  • SHA-1 Encryption is not working in Container managed security

    Hi,
    I have to turn to your help after no luck with other possible resource.
    I implemented container managed security on my apps and it works well without the encrypted password(clear text) in the table column. Now I referred OC4J Security guide to implement the password encryption as follows:
    1. Using the DBTableOraDataSourceLoginModule, set the option pw_encoding_class = oracle.security.jazn.login.module.db.util.DBLoginModuleSHA1Encoder
    2. run the following procedure:
    DECLARE
        l_password VARCHAR2(50) := 'welcome';
        l_password_raw RAW(128) := utl_raw.CAST_TO_RAW(l_password);
        l_encrypted_raw RAW(2048);
        l_encrypted_string VARCHAR2(2048);
        l_encrypted_string2 VARCHAR2(2048);
    BEGIN
        dbms_output.put_line('Password in String: ' || l_password);
        dbms_output.put_line('Password in raw: ' || l_password_raw);
        l_encrypted_raw := dbms_crypto.hash(l_password_raw, dbms_crypto.HASH_SH1);
        dbms_output.put_line('SH1: ' || l_encrypted_raw);
        l_encrypted_string := UTL_ENCODE.BASE64_ENCODE(l_encrypted_raw);
        dbms_output.put_line('Base64Encoding: ' || l_encrypted_string);
    END;
    3. update the clear text password with the SHA-1 encrypted password and encoded in Base64Encoding (in my case, it's the parameter "l_encrypted_string")Now I run the application and login says "password not matching!" If anyone know what's going on, please advise me what's wrong...pls
    thanks very much,

    Hi,
    hard to say without knowing the code the OC4J team uses in their login module. I know they based it on a JAAS LoginModule I wrote some years ago, but they did change some parts of it. In the original version. the password was read from the database and then compared with the provided password string. Using encryption it uses a class to encode and decode the password queried from teh database. My guess is that the returned string - after decoding - doesn't meet the password string you provide when authenticating. Since this piece of code is owned by the OC4J team, I suggest to try the Application Server forum or the Security forum
    Frank

  • SetRollbackOnly() doesn't work with Oracle

    Hi all,
    I'm using an Oracle database and Weblogic server. However, when I execute the following code (which is contained within an ejb session bean method):
    // Lookup datasource
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup(DATASOURCE);
    connection = ds.getConnection();
    // Insert some data
    connection.createStatement().executeUpdate("some insert statement");
    // Rollback the insert statement
    sessionContext.setRollbackOnly()... the insert statement is not rolled back even though I explicitly call setRollbackOnly().
    Could anyone help?

    Transaction attribute for the method is 'Required'.
    Any suggestions...?

  • MDB container managed transaction demarcation not working in wls 6.1 beta

    I have an MDB which sends the messages it receives onto another JMS
              destination within the onMessage method. These messages are not sent to
              the JMS destination unless I explicitly use a transacted session for the
              destination and subsequently commit the session. If I set the transacted
              parameter to Session as false the messages are sent. If I set the
              transacted parameter to true the messages will only be output if the
              session is committed. This is the standard behaviour for a JMS session
              but this is not the correct behaviour for an MDB running with
              container-managed transaction demarcation.
              For a start the transacted parameter to session should be ignored when
              run in the context of a container transaction and the commit method
              should thrown an exception as it is not allowed within the context of a
              container transaction.
              This is the MDB code and the deployment descriptor: -
              public class MessageBean implements MessageDrivenBean, MessageListener
              private String topicName = null;
              private TopicConnectionFactory topicConnectionFactory = null;
              private TopicConnection topicConnection = null;
              private TopicSession topicSession = null;
              private Topic topic = null;
              private TopicPublisher topicPublisher = null;
              private TextMessage textMessage=null;
              private transient MessageDrivenContext messageDrivenContext = null;
              private Context jndiContext;
              public final static String
              JMS_FACTORY="weblogic.examples.jms.TopicConnectionFactory";
              public final static String
              TOPIC="weblogic.examples.jms.exampleTopic";
              public MessageBean()
              public void setMessageDrivenContext(MessageDrivenContext
              messageDrivenContext)
              this.messageDrivenContext = messageDrivenContext;
              public void ejbCreate()
              public void onMessage(Message inMessage)
              try
              jndiContext = new InitialContext();
              topicConnectionFactory =
              (TopicConnectionFactory)jndiContext.lookup(JMS_FACTORY);
              topic = (Topic) jndiContext.lookup(TOPIC);
              topicConnection =
              topicConnectionFactory.createTopicConnection();
              topicConnection.start();
              // The transacted parameter should be ignored in the context of a
              container tx
              topicSession = topicConnection.createTopicSession(true,
              Session.AUTO_ACKNOWLEDGE);
              topicPublisher = topicSession.createPublisher(topic);
              textMessage = (TextMessage)inMessage;
              topicPublisher.publish(inMessage);
              // this is illegal in a container transaction
              topicSession.commit();
              topicConnection.close();
              catch (JMSException je)
              throw new EJBException(je);
              catch (NamingException ne)
              throw new EJBException(ne);
              public void ejbRemove()
              <?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>
              <display-name>MessageBean</display-name>
              <ejb-name>MessageBean</ejb-name>
              <ejb-class>MessageBean</ejb-class>
              <transaction-type>Container</transaction-type>
              <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
              </message-driven-destination>
              <security-identity>
              <description></description>
              <run-as>
              <description></description>
              <role-name></role-name>
              </run-as>
              </security-identity>
              </message-driven>
              </enterprise-beans>
              <assembly-descriptor>
              <container-transaction>
              <method>
              <ejb-name>MessageBean</ejb-name>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              </assembly-descriptor>
              </ejb-jar>
              

    Please see the response in the EJB newsgroup.
              Also, could you kindly only post to a single newsgroup?
              Thanks.
              "Jimmy Johns" <[email protected]> wrote in message
              news:[email protected]...
              > I have an MDB which sends the messages it receives onto another JMS
              > destination within the onMessage method. These messages are not sent to
              > the JMS destination unless I explicitly use a transacted session for the
              >
              > destination and subsequently commit the session. If I set the transacted
              >
              > parameter to Session as false the messages are sent. If I set the
              > transacted parameter to true the messages will only be output if the
              > session is committed. This is the standard behaviour for a JMS session
              > but this is not the correct behaviour for an MDB running with
              > container-managed transaction demarcation.
              >
              > For a start the transacted parameter to session should be ignored when
              > run in the context of a container transaction and the commit method
              > should thrown an exception as it is not allowed within the context of a
              > container transaction.
              >
              > This is the MDB code and the deployment descriptor: -
              >
              > public class MessageBean implements MessageDrivenBean, MessageListener
              > {
              > private String topicName = null;
              > private TopicConnectionFactory topicConnectionFactory = null;
              > private TopicConnection topicConnection = null;
              > private TopicSession topicSession = null;
              > private Topic topic = null;
              > private TopicPublisher topicPublisher = null;
              > private TextMessage textMessage=null;
              > private transient MessageDrivenContext messageDrivenContext = null;
              >
              > private Context jndiContext;
              >
              > public final static String
              > JMS_FACTORY="weblogic.examples.jms.TopicConnectionFactory";
              > public final static String
              > TOPIC="weblogic.examples.jms.exampleTopic";
              >
              > public MessageBean()
              > {
              > }
              >
              > public void setMessageDrivenContext(MessageDrivenContext
              > messageDrivenContext)
              > {
              > this.messageDrivenContext = messageDrivenContext;
              > }
              >
              > public void ejbCreate()
              > {
              > }
              >
              > public void onMessage(Message inMessage)
              > {
              > try
              > {
              > jndiContext = new InitialContext();
              > topicConnectionFactory =
              > (TopicConnectionFactory)jndiContext.lookup(JMS_FACTORY);
              > topic = (Topic) jndiContext.lookup(TOPIC);
              > topicConnection =
              > topicConnectionFactory.createTopicConnection();
              > topicConnection.start();
              > // The transacted parameter should be ignored in the context of a
              > container tx
              > topicSession = topicConnection.createTopicSession(true,
              > Session.AUTO_ACKNOWLEDGE);
              > topicPublisher = topicSession.createPublisher(topic);
              > textMessage = (TextMessage)inMessage;
              > topicPublisher.publish(inMessage);
              > // this is illegal in a container transaction
              > topicSession.commit();
              > topicConnection.close();
              > }
              > catch (JMSException je)
              > {
              > throw new EJBException(je);
              > }
              > catch (NamingException ne)
              > {
              > throw new EJBException(ne);
              > }
              > }
              >
              > public void ejbRemove()
              > {
              > }
              > }
              >
              >
              >
              >
              > <?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>
              > <display-name>MessageBean</display-name>
              > <ejb-name>MessageBean</ejb-name>
              > <ejb-class>MessageBean</ejb-class>
              > <transaction-type>Container</transaction-type>
              > <message-driven-destination>
              > <destination-type>javax.jms.Queue</destination-type>
              > </message-driven-destination>
              > <security-identity>
              > <description></description>
              > <run-as>
              > <description></description>
              > <role-name></role-name>
              > </run-as>
              > </security-identity>
              > </message-driven>
              > </enterprise-beans>
              > <assembly-descriptor>
              > <container-transaction>
              > <method>
              > <ejb-name>MessageBean</ejb-name>
              > <method-name>*</method-name>
              > </method>
              > <trans-attribute>Required</trans-attribute>
              > </container-transaction>
              > </assembly-descriptor>
              > </ejb-jar>
              >
              >
              >
              >
              >
              >
              >
              >
              

  • MDB Container Managed Transaction and Log4J

    Hi,
    I'm programming and MDB that reads and updates a database then sends out an HTTP Post and logs using log4j. I've read that when an MDB is configured as CMT or container managed transaction and the OnMessage method executes without errors, the transaction is implicitly commited. You can rollback the transaction by explicitly calling setRollbackOnly() or when a RuntimeException has been thrown. My worry is that after I have sent out an HTTP POST (a transaction has been completed) I would have to log a transaction completion using log4j. My problems is if log4j throws a RuntimeException thereby rolling back my transaction which shouldn't be the case. What I have done is to catch all Exceptions (and swallow them) whenever I log using log4j after I have sent out an HTTP POST succesfully (since my transaction should be complete by then). Is this a correct workaround?
    Thanks :)

    Your approach is correct. If you think, Log4J might throw errors, swallow the exceptions and try not to roll back.

  • Container managed transactions in 9.0.3 (plus AQ JMS/MDB)

    Something for "real programmers", similar to MDB Transaction Exception on OC4J 9.0.4 (MDB Transaction Exception on OC4J 9.0.4) but little bit different. Maybe author of the mentioned thread can find some answers here also.
    We have an MDB accessing AQ in database (this works either with 9i and 8i). MDB receives the message (actually TextMessage), retrieves the content/properties and calls some EJBs making database operations. When we used just the same DataSource for JMS resource provider and SQL operations, everything worked OK. But we need to move one step further - making calls to several databases, some 8i, some might 9i. We were able to start CMT for one DataSource, i. e. configuring OrionCMTDataSource over JDBC ORACLE driver (if you use different DataSource class, message remains stucked in queue and eventually expires. If you don't specify container managed transactions for MDB in ejb-jar.xml, it works with any DataSource class - but message is lost every time exception occurs - not very pleasant situation).
    We are trying to configure DataSources so they provide transactional support while using commit coordinator. There are some documents describing this - in 9iAS Data Sources and JTA, Orion Data Sources and possibly JTA description in 9i database documentation. Both ORACLE documents are very similar. Generally, these are main steps:
    1) configure each data source so they provides CMT support (wrap native driver/data source by OrionCMTDataSource class)
    2) create datasource commit-coordinator database, also using CMT(?)
    3) create user in commit-coordinator database and same in each other database with connect, resource, create session + force any transaction priviledge (since it would commit other users transactions)
    4) create database links from commit-coordinator database to each databases (but... see questions below)
    5) configure commit coordinator so it uses proper data source
    6) add each DB link as a property to data sources
    7) configure data source for JMS
    8) connect JMS resource provider with JMS data source
    9) Start container, send message, etc.
    So far the only result we've got is a trace file in database user dumps and generic "javax.transaction.SystemExeption: Could not commit: error code 29540". User dump occurs in a "remote" database, not the one where commit coordinator resides. If I drop database links, result is the same, so it seems like problem with data source itself. In a dump there is piece of text like this: "FATAL ERROR IN TWO-TASK SERVER: error = 12571" and "ksedmp: internal or fatal error
    Current SQL statement for this session:
    begin dbms_aqin.aq$_dequeue_in( :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29); end; ". I think AQ call is just a coincidence since it is the first one involved in transactions. Down there in HEX part of a dump there is a message about protocol or network error ("probably ORA-28546")
    Here is an example of data source configuration we are using:
    <!-- Passport CMT DataSource -->
    <data-source
    name="PassportDS"
    class="com.evermind.sql.OrionCMTDataSource"
    location="jdbc/PassportDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="int"
    password="int"
    url="jdbc:oracle:thin:@ws18885:1521:ICON"
    inactivity-timeout="30">
    <property name="dblink" value="ICON.WS18885.APPG.COM"/>
    There are some questions pending. Obvious one is if CMT is working or not at all and we should find some different solution (Bean managed transactions or use XA, hmmm). Other one might be that database link has to be "fully-qualified". I'm not sure what it means: using username and password? Using database name along with domain (if any)? So far it seems links are not used anyway.
    We've tried several databases, like 9.2.0.1 and 9.0.3 versions. Result is the same.
    We've tried to use XA data source of ORACLE (oracle.jdbc.xa.client.OracleXADataSource) and OrionCMT data source bound by xa-source-location to it but container gets stucked upon restart with "Investingating resource 'XADataSource PassportXADS' for recovery..." and similar messages for an hour.
    There is an OracleJTADataSource mentioned in several documents, but I cannot find any in jdbc classes - was it deprecated?
    Lies the problem in JMS itself? So far we've been able to use AQ in 8i and 9i and succesfully commit every transaction - provided transaction was local.
    Since XA itself is working I guess problem might be with configuration.
    I will appreciate any opinion on CMT... also, if you have any questions, please ask.
    Myrra

    Hi Per,
    I don't have an answer for you -- sorry {:-( -- only a suggestion (which
    you may have already tried, anyway :-). Have you tried running OC4J
    in "debug" mode? The following web-page gives details on how to do that:
    http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
    Also, if you aren't already aware of them, the following web-sites
    may also be helpful (not in any particular order):
    http://www.orionserver.com
    http://www.orionsupport.com
    http://www.elephantwalker.com
    Good Luck,
    Avi.

  • Device Manager ! FN button doesn't work

    Portege R835-P56X Bios updated to Version 3 The laptop came with 64 Bit but I did a clean install with Windows 7 32 Bit because many of my programs and games didn't work with 64 Bit.
    I can't install Toshiba Value Added Package,Toshiba PC Health Monitor and Toshiba eco Utility because they are 64 Bit.Pressing the FN button doesn't work,it does nothing at all using 32 Bit.With 64 Bit it worked fine with screen icons coming up when I pressed it.I wonder if the FN button only work in 64 Bit or maybe Toshiba Value Added Package contains the FN button driver?If anyone knows where to get Toshiba Value Added Package 32 Bit that may fix this problem,please let me know thanks.
    I have a problem in Device Manager where it's showing ! Other Devices PCI Simple Communications Controller.I took a screen shot of Device Manager with 64 Bit installed just incase I ran into problems.Looking at the 2 Device managers side by side 32 vs 64 it looks like Microsoft Virtual WiFi Miniport Adapter is missing from the 32 Bit Device Manager.
    I'm assuming this is Intel Wireless Display but I'm not 100% sure.Because every time I run Intel Wireless Display I get this error message.Unable to load the Intel My WiFi Technology Dll file
    Anyway there is no Intel Display driver for 32 Bit so I had to download that from Intel website.There is however Intel Wireless Display for 32 Bit which I have installed but the ! in device manager remains.So I uninstalled Intel Wireless Display and downloaded the Wireless Display driver 32 Bit from Intel website hoping that might fix the problem.But the ! in device manager remains.
    I have also tried windows update but it can't find any driver for Hardware.I have added 2 screen shots in Attachments
    Attachments:
    2.jpg ‏39 KB
    1.jpg ‏167 KB

    Well after alot of searching on Google I have finally found out what this PCI Simple Communications Controller is.
    It's the Intel Management Engine Interface and lucky for me there is a 32 Bit driver.Now I have no more ! in Device Manager and I have uploaded an updated screen shot.
    But now there are 3 questions.
    1 What happened to the Microsoft Virtual WiFi Miniport Adapter?It was listed twice in 64 Bit but doesn't show up in 32 Bit Device Manager.
    2 Why do I still get the error message when starting Intel Wireless Display?Unable to load the Intel My WiFi Technology Dll file even though I have found the driver for ! in Device Manager
    3 Why doesn't the FN button work?It worked fine in 64 Bit but in 32 Bit it does absolutely nothing.The same goes for the touchpad on/off button which worked fine before in 64 Bit.But now with 32 Bit presing it doesn't turn the touchpad on or off,It does nothing.I hope Toshiba releases drivers for both of these features.
    Attachments:
    Updated Screenshot.jpg ‏49 KB

  • Layout Manager doesn't  work

    Hello !
    After few days, I can't solve this problem, please help me before I will become completely insane !!!
    I have a JInternalFrame which contain a panel (the contentpane). I add a JTabbedPane to this contentpane. This tabbedpane consists of 2 panel in 2 tab. I would like to add some components for each panel with a GridBagLayout manager but it doesn't work. Components are displayed at center of panel on 1 row although each of them have a specific gridx and gridy...
    See below :
    public class WFParamsFrame extends JInternalFrame{
         private javax.swing.JPanel jContentPane = null;
         private javax.swing.JPanel jGeneralPanel = null;
         private ResourceBundle messages;
         private aMain app;
         private StaticParamsFrame staticDataFrame;
         private int indexWF;
         private javax.swing.JTabbedPane jTabbedPane = null;
         private javax.swing.JLabel jLabel = null;
         private javax.swing.JTextField jTextField = null;
         private javax.swing.JLabel jLabel1 = null;
         private javax.swing.JTextField jTextField1 = null;
    public WFParamsFrame(aMain a, StaticParamsFrame sdFrame, int _index, boolean bool) {
    super();
    app=a;
    staticDataFrame = sdFrame;
    indexWF = _index;
    messages=app.getMessages();
    initialize();
    private void initialize() {
    this.setSize(670, 385);
    this.setContentPane(getJContentPane());
    this.setTitle(messages.getString("AWFParF_TitleShowParams"));
    this.jTabbedPane.setTitleAt(0, messages.getString("AWFParF_TitleGeneralTab"));
    this.setClosable(true);
    this.setVisible(true);
    this.setIconifiable(true);
    this.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() {
         public void internalFrameClosing(javax.swing.event.InternalFrameEvent e) {   
              frameClose();
    private javax.swing.JPanel getJContentPane() {
    if (jContentPane == null) {
         jContentPane = new javax.swing.JPanel();
         jContentPane.setLayout(new java.awt.BorderLayout() );
         jContentPane.add(getJTabbedPane(),java.awt.BorderLayout.CENTER);
    return jContentPane;
    private javax.swing.JTabbedPane getJTabbedPane() {
    if(jTabbedPane == null) {
         jTabbedPane = new javax.swing.JTabbedPane();
         jTabbedPane.addTab(null, null, getGeneralPanel(), null);
         jTabbedPane.setMnemonicAt(0, KeyEvent.VK_G);          
    return jTabbedPane;
    private javax.swing.JPanel getGeneralPanel() {
    if(jGeneralPanel == null) {
         jGeneralPanel = new javax.swing.JPanel(new java.awt.GridBagLayout());
         addComponent(jGeneralPanel, getJLabel(),           0, 0, 1, 1, 1, 1);
         addComponent(jGeneralPanel, getJTextField(),      1, 0, 1, 1, 1, 1);
         addComponent(jGeneralPanel, getJLabel1(),      2, 0, 1, 1, 1, 1);
         addComponent(jGeneralPanel, getJTextField1(),      3, 0, 1, 1, 1, 1);
         addComponent(jGeneralPanel, getJLabel2(),      2, 1, 1, 1, 1, 1);
         addComponent(jGeneralPanel, getJComboBox2(),      1, 1, 1, 1, 1, 1);
         addComponent(jGeneralPanel, getJLabel3(),      2, 1, 1, 1, 1, 1);
         addComponent(jGeneralPanel, getJTextField3(),      3, 1, 1, 1, 1, 1);     
         jGeneralPanel.setSize(700, 350);
         jGeneralPanel.setPreferredSize(new java.awt.Dimension(700,350));
    return jGeneralPanel;
    private void addComponent(JPanel p, java.awt.Component component,
                             int row, int column, int width, int height,
                             int weighty, int weightx) {
    GridBagConstraints c = new GridBagConstraints();
    c.gridx= column;
    c.gridy=row;
    c.gridwidth=width;
    c.gridheight=height;
    c.anchor=GridBagConstraints.NORTHWEST;
    c.weighty = weighty;
    c.weightx= weightx;
    p.add(component, c);
    }

    GridBagLayout is something I avoid at all costs. Use BoxLayout and javax.swing.Box.I've asked this before and I'm still waiting for a counterexample: I claim
    their are plenty of reasonable GUIs where GBL is the obvious answer. Take the challenge...
    Perhaps you could help an old man out and recreate the following simple GUI, sans GridBagLayout.
    import java.awt.*;
    import javax.swing.*;
    public class GridBagExample {
        public static void main(String[] args) {
            UIManager.put("TextField.margin", new Insets(3,5,3,5));
            String[] labelText = {"field 1:", "field 2:", "a text area:", "last field:"};
            JPanel p = new JPanel(new GridBagLayout());
            p.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
            GridBagConstraints gbc = new GridBagConstraints();
            //labels:
            gbc.gridx = 0;
            gbc.anchor = GridBagConstraints.FIRST_LINE_END;
            gbc.insets = new Insets(2,2,2,2);
            for(int i=0; i<labelText.length; ++i)
                p.add(new JLabel(labelText), gbc);
    //text:
    gbc.gridx = 1;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    for(int i=0; i<labelText.length; ++i)
    p.add(i==2? new JScrollPane(new JTextArea(5, 20)): new JTextField(20), gbc);
    //display p:
    JFrame f = new JFrame("GridBagExample");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setContentPane(p);
    f.pack();
    f.setResizable(false);
    f.setLocationRelativeTo(null);
    f.setVisible(true);

  • Can a use a partitioned external hard drive to create a disk image? I tried, doesn't seem to work using disk manager.

    Can a use a partitioned external hard drive to create a disk image? I tried, doesn't seem to work using disk manager.

    OK, it's very bad computing to use a backup disk for anything but a backup. The reason being is if/when the HD crashes you will have lost not only all your backup but the data files. While I commend you for wanting redundant backup, you really need separate EHDs for doing so. Format each EHD using Disk Utility to Mac OS Extended (Journaled) using the GUID parttition. When you connect, OS X will ask if you want to use that drive as a Time Machine backup drive, select yes and then let it backup. On the second EHD format the same way however do not use TM as a backup, this time I'd suggest an app such as SuperDuper or Carbon Copy Cloner to make a clone of the internal HD. Leave both EHDs connected and TM will backup new or changed files automatically on a hourly basis. The clone you will need to set to backup on the schedule you want. For example I have my SuperDuper EHD set to backup only changed or updated files at 2AM every day.
    The advantage of a clone is that if the computers internal HD crashes you can boot from a clone and continue working, TM will not do that but it's great for keeping an archive of all files. So if you want a version of a file from many months ago, TM will help you locate and restore it.

  • Submit button doesn't work after moving form to another parent container

    I'm re-arranging the page using jquery. When I moved a div or table containing a form to another div, the submit button doesn't work anymore. Using the emulation mode under the Inspect Element feature of IE, the same code works for IE9 but not under IE10
    and up.
    Any ideas?
     

    I will steal the answer that George gave to a similar question, because it turns out it is applicable here as well:
    George Johnson  on Feb 23, 2012 11:17 AM 
    When you distribute a form, it replaces the email address that you've set up in a submit button with the email address you have specified in "Edit > Preferences > Identity > Email Address". So before you initiate the Distribute Form process, change the email address there to the one you want to use.
    It is a ridiculous solution, because it means I have to make the identity of my personal copy of Acrobat the email address of someone else or some other department when I make the form, but whatever -- at least the form sends now.

  • RE: Firefox search box - manage search engines - get more search engines.. IT DOESN'T WORK , I now get 1000's of useless irrelevant results, PLEASE FIX THE SITES SEARCH NOW, IT'S COMPLETELY USELESS NOW

    RE: Firefox search box -> manage search engines -> get more search engines..
    IT DOESN'T WORK
    I just want to add youtube + some others to the list of sites in the Firefox search box, I now get 1000's of useless irrelevant results, PLEASE FIX THE SITES SEARCH NOW, IT'S COMPLETELY USELESS NOW

    Hi Kvoter,
    What are you hoping for, firefox to display lists of sites you have visited or bookmarked ?
    *''' it should be able to do that'''
    * my firefox does that
    I am only a fellow ordinary user of Firefox & XP, but maybe the problem is on your machine, rather than needing a fix from firefox. If you take a little time to read this you may be able to sort out the problems yourself.
    I hope you do not mind me covering a few basics:
    * the [[Search bar]] { <-- clickable link -- ] is designed to produce a lot or results, whereas
    *the [[Location bar search|Location Bar]] is a lot more specific and may be [[Location bar autocomplete#w_controlling-behavior|set]] to include or exclude History & or [[bookmarks]]
    If you are getting literally 1000s of totally unrelated results you may need to consider [[Is my Firefox problem a result of malware]]
    Hope to hear that you have solved the problem, or a bit more detail about what still is a problem.
    John

  • Solaris Container Manager console does not work

    I've loaded SMC 3.6 and loaded the container manager piece with no problems on a fresh Solaris 10 (11/06) install on a blade 1000. The managment center works just fine. I've loaded the container manager according to the following doc:
    http://docs.sun.com/app/docs/doc/819-4098/6n699bc48?a=view
    The install went fine but when I point my browser to the page specified in the doc above the browser wants to download a bin file. I've restarted the java web server as shown in the above doc and I've scanned the port 6789 with nmap to make sure it was open. All browsers I've tried want to download a bin file. They are not launching a console as shown in the doc.
    I've tried firefox on linux, netscape on solaris and IE on windows. Java is loaded and working on all platforms. How do I get this working?

    use secure http
    https://<server name>:6789
    make sure you ran the setup for Solaris Container Manager

  • Sunplex Manager Cluster GUI Tool doesn't work

    The Sun Cluster management tool doesn't work, I keep getting the following error on my browser:
    "System Error, An Error was encountered by the system. If you were performing an action when this occurred, review the current system state prior to proceeding"
    The GUI shows Nodes, Resouce Groups, Shared Storage etc in the left hand frame and the error in the right hand frame.
    The command line interface works fine so does the cluster.
    Solaris 8 07/03 SPARC
    Sun cluster 3.1
    Relevant patches loaded: 117950-25, 118626-09, 118671-03
    java -version: 1.4.1_01-b01

    This is now resolved - The machine was set up to use a DNS, the DNS resolved the name correctly but the hosts file did not have the full canonical name of the host.
    I added the full cname of the node to the /etc/hosts file and all is well now.

  • @postconstruct doesn't work in managed bean

    Hi,
    I'm using JBOSS 6, JSF 2 and EJB 3.1, i have an ear with
    - EJB folder (@postconstruct is working)
    - JSF folder with manged bean where @postconstruct doesn't work
    This my manged bean :
    package com.galhauban.geriex;
    import java.util.ArrayList;
    import java.util.List;
    import javax.annotation.PostConstruct;
    import javax.ejb.EJB;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.ViewScoped;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.SelectItem;
    import javax.servlet.ServletContext;
    import org.richfaces.event.ItemChangeEvent;
    @ManagedBean
    @ViewScoped
    public class AdministrationController {
    @EJB
    private VilleBean ville;
    private List<SelectItem> villes = new ArrayList<SelectItem>();
    private String commune;
    private String communeId;
    private String cp;
    private String labelListCommune;
    @EJB
    private BisBean bisBean;
    private String bis;
    private Integer bisId;
    private List<SelectItem> bisList = new ArrayList<SelectItem>();
    @EJB
    private RueBean rueBean;
    private String rue;
    private String rueId;
    private List<SelectItem> ruesList = new ArrayList<SelectItem>();
    //boolean desactives pour n'afficher que ce que l'on souhaite a partir du menu
    private boolean bCommune =false;
    private boolean bBis =false;
    private boolean bRue =false;
    private UIComponent selectedChild = null;
    //Pour connaitre l'item du menu actif
    private String selectedTab;
    private List<String> renderComponents = new ArrayList<String>();
    public AdministrationController(){
    ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
    System.out.println("============================================================================");
    System.out.println("==================================CONSTRUCTEUR==============================");
    System.out.println("Servlet : "+servletContext.getEffectiveMajorVersion()+"."+servletContext.getMinorVersion());
    System.out.println("============================================================================");
    @PostConstruct
    public void postConstruct(){
    setSelectedTab("rue");
    System.out.println("###################################################");
    System.out.println(" POST CONSTRUCT MANAGED BEAN ");
    System.out.println("###################################################");
    JanusController multi = new JanusController();
    * AFFICHAGE DES MODIFS/SUP/AJOUT EN FONCTION DU MENU SELECTIONNE
    public void updateCurrent(ItemChangeEvent event){
    setSelectedTab(event.getNewItem().getId());
    System.out.println("====> SELECTEDTAB " + selectedTab.toString());
    if (selectedTab.equals("commune")) {
    setbCommune(true);
    setbBis(false);
    setbRue(false);
    renderComponents.add("gCommune");
    else if (selectedTab.equals("bis")) {
    setbBis(true);
    setbCommune(false);
    setbRue(false);
    renderComponents.add("gBis");
    else if (selectedTab.equals("rue")) {
    setbRue(true);
    setbBis(false);
    setbCommune(false);
    renderComponents.add("gRue");
    else System.out.println("----> pas dans le if " + selectedTab.toString());
    public void ajouter(){
    System.out.println("====> AJOUTER SELECTEDTAB " + selectedTab.toString());
    if (selectedTab.equals("commune")) {
    System.out.println("ajouter commune ");
    ville.ajouter(commune, cp);
    else if (selectedTab.equals("bis")) {
    System.out.println("ajouter iBbis ");
    bisBean.ajouter(bis);
    else if (selectedTab.equals("rue")) {
    System.out.println("ajouter rue: "+commune);
    rueBean.ajouter(rue, Integer.parseInt(communeId));
    else System.out.println("----> pas dans le if de l'ajouter " + selectedTab.toString());
    public void modifier(){
    System.out.println("====> MODIFIER SELECTEDTAB " + selectedTab.toString());
    if (selectedTab.equals("commune")) {
    ville.modifier(Integer.parseInt(communeId), commune);
    else if (selectedTab.equals("bis")) {
    bisBean.modifier(bisId, bis);
    else if (selectedTab.equals("rue")) {
    rueBean.ajouter(rue, Integer.parseInt(communeId));
    else System.out.println("----> pas dans le if de modifier " + selectedTab.toString());
    public void supprimer(){
    System.out.println("====> SUPRIMER SELECTEDTAB " + selectedTab.toString());
    if (selectedTab.equals("commune")) {
    System.out.println("ajouter commune ");
    ville.ajouter(commune, cp);
    else if (selectedTab.equals("bis")) {
    System.out.println("supprimer iBbis ");
    bisBean.supprimer(bisId);
    else if (selectedTab.equals("rue")) {
    System.out.println("ajouter rue: "+commune);
    rueBean.ajouter(rue, villes.indexOf(ville));
    else System.out.println("----> pas dans le if de l'ajouter " + selectedTab.toString());
    * LISTENER
    public void selectListener(ValueChangeEvent vce){
    System.out.println("new value : "+vce.getNewValue());
    public void listAdminCommune(ValueChangeEvent vce){
    System.out.println("listener*************");
    ruesList.clear();
    ruesList = rueBean.listRue(Integer.parseInt(vce.getNewValue().toString()));
    * AUTRES FONCTIONS
    public boolean invbool(boolean vrai){
    if (vrai == true) return false;
    else return true;
    * GETTER AND SETTER
    Any help will be highly appreciated.
    Regards
    Couse1

    Hi,
    First of all thanks for your help.
    I've some problems to add a new mojarra version (2.1.2) to jboss 6
    1- I modified the file META-INF\jsf-integration-deployer-jboss-beans.xml
    <entry>
              <key>Mojarra-2.1.2</key>
              <value>${jboss.server.home.url}deployers/jsf.deployer/Mojarra-2.1.2</value>
    </entry>
    <bean name="JSFUrlIntegrationDeployer-212" class="org.jboss.jsf.deployer.JSFUrlIntegrationDeployer">
        <property name="JSFConfigName">
          <value>Mojarra-2.1.2</value>
        </property>
        <property name="JSFImplManagementDeployer">
          <inject bean="JSFImplManagementDeployer"/>
        </property>
      </bean>2- I added this code in my web.xml(war)
    <context-param> 
            <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name> 
            <param-value>Mojarra-2.1.2</param-value> 
          </context-param>3- And in the folder ...\deployers\jsf.deployer\Mojarra-2.1.2, i've got :
    - jsf-libs with jars
    - META-INF with web.xml
    I took the web.xml from Mojarra-2.0 :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
       version="2.5">
       <!-- ======================== Introduction ============================== -->
       <!-- This document defines default values for the Mojarra-2.0 JSF config  -->
       <!--                                                                      -->
       <!-- WARNING:  Do not configure application-specific resources here!      -->
       <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->
       <!-- =========== Common Context Params ================================== -->
       <!-- Regular expression to determine if two different URLs actually point -->
       <!-- to the same jar file.  This keeps faces-config files from being      -->
       <!-- read twice.                                                          -->
       <context-param>
         <param-name>com.sun.faces.duplicateJARPattern</param-name>
         <param-value>^tmp\d+(\S*\.jar)</param-value>
       </context-param>
       <!-- JBossInjectionProvider provides resource injection for managed beans. -->
       <!-- See JSF 1.2 spec section 5.4 for details.                             -->
       <context-param>
         <param-name>com.sun.faces.injectionProvider</param-name>
         <param-value>org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider</param-value>
       </context-param>
       <!-- ================== Common filter Configuration ==================== -->
       <!-- ================== Common Listener Configuration ==================== -->
       <!-- Configures JSF 2.0 -->
       <listener>
         <listener-class>org.jboss.web.jsf.integration.config.JBossMojarra20ConfigureListener</listener-class>
       </listener>
    </web-app>And of course i've got this error :
    org.jboss.web.jsf.integration.config.JBossMojarra20ConfigureListener: java.lang.ClassNotFoundException: org.jboss.web.jsf.integration.config.JBossMojarra20ConfigureListener
    I don't know where to find the listener-class, and in fact i don't know to configure this web.xml.
    Help or sugestion will be appreciated.
    Best regards
    couse1

Maybe you are looking for

  • My internet has started running extremely slowly for no apparent reason. Please help?

    The internet on my Macbook suddenly started running very slowly, it can take 5-10 minutes to load a page. This isn't a problem with my internet connection as our other devices are working fine. I have tried installing updates but seems to be too slow

  • Difficulty in resolving ORA-06502: PL/SQL: numeric or value error:

    Hi I am having great difficulty to resolve the following error - ORA-06502: PL/SQL: numeric or value error: character string buffer too small . In my Oracle Package, I have a Function that returns a varchar(255). My Function is basically as follows:

  • Lost sync info...

    I'd appreciate if you could help me on this.. I formatted my hdd and tried to sync my bookmarks back from previous state (previous instalation), but I accidently lost my sync key so I made another. I believed that I could acces my original sync accou

  • Recording phone messge/voice mail

    Does anyone know if it is possible to "record and/or copy" a voicemail left on your Palm Pre? Thanks for any help. Post relates to: Pre p100eww (Sprint)

  • JUnit vs. assert

    I haven't used JUnit before, but I have been reading up on it. My question is why would I want to use JUnit instead of just using the assert facility available in 1.4?