EJB 3 and connection to DB

Hello,
I use EJB 3 for my application and it uses <local-tx-datasource> for connecting to database,everything works fine but i have one question: How many connection does it open to DB? I thing that only one ,but i am not sure.is that server specific? or does it open number of connections how many users are in session?

dato.java wrote:
Hello,
I use EJB 3 for my application and it uses <local-tx-datasource> for connecting to database,everything works fine but i have one question: How many connection does it open to DB? I thing that only one ,but i am not sure.is that server specific? or does it open number of connections how many users are in session?Your container manages the connections if you are using JTA. The settings are therefore configurable in your container specific datasource file.
e.g for JBOSS you would add something like
<min-pool-size>1</min-pool-size>
<max-pool-size>10</max-pool-size>in your <local-tx-datasource> inside XXX-ds.xml

Similar Messages

  • Problem with EJB and JMS - Failed to obtain/create connection

    hello ejb and jms programmers,
    My problem is my topic MDB keep on retrieving the same message when there is a database connection failure. Maybe somebody could help me how to prevent to retrieve the same data?
    Given:
    - I purposedly turn off the pointbase database because im testing my error handling.
    - Im using SJSAS 8 as my application server.
    - My message Driven Bean of topic type.
    - Im using CMP for my entity bean
    Here is the scenario of whats happening - step by step:
    1. A separate application publishes a message to JMS queue server
    2. My MDB retrieves this message and do some processing then inserts a record (transaction history) in my database
    3. But my db is turned off or down
    4. My MDB sends a successful processing reply to the JMS queue server
    5. Then i noticed that my server.log keeps on growing so when i opened it, the record was not inserted and printed the stacktrace below "RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException" (complete stacktrace below)
    6. I understand the cause of the stacktrace is because the DB is turned off. But what i dont understand is that my MDB keeps on reading the same message. Since my MDB is of topic type, isnt a topic MDB supposedly reads a message only once???
    So my questions are:
    1. how do i handle insert database error?
    2. how can i stop my MDB from processing the same message?
    3. any better suggestions?
    Thank you in advance :)
    leigh
    *** more complete stack trace ***
    [#|2005-01-09T15:35:57.097+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=17;|JTS5041: The resource manager is doing work outside a global transaction
    javax.transaction.xa.XAException
         at com.pointbase.xa.xaException.getXAException(Unknown Source)
         at com.pointbase.xa.xaConnectionResource.start(Unknown Source)
         at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:162)
    [#|2005-01-09T15:35:57.167+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5027:Unexpected exception in resource pooling
    javax.transaction.SystemException
         at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:185)
         at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:360)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:303)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:115)
    [#|2005-01-09T15:35:57.177+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException|#]
    [#|2005-01-09T15:35:57.227+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]
    [#|2005-01-09T15:35:57.237+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=17;|EJB5071: Some remote or transactional roll back exception occurred
    com.sun.jdo.api.persistence.support.JDODataStoreException: JDO77006: SQL exception: state = null, error code = 0.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
    FailedObjectArray: [[email protected]5ac]
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnectionInternal(TransactionImpl.java:1444)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnection(TransactionImpl.java:1339)

    Hi annie,
    Wherever you are handling database transactions,
    you'd not be able to create a Connection if database
    is closed (I think you mentioned turning off the
    database) then at this condition, you should
    certainly throw a System level exception and stop all
    processing with some meaningful flow to indicate a
    failure (like display message on UI). Even
    network problems are handled by exceptions... so I
    don't see a reason why you didn't wrap it in the
    first place.
    Anyway, try handling specific exceptions rather than
    the general Exception... this will give you a better
    idea of what to do in case of an exception.Yes i know this. I am practicing this in my non-j2ee server applications. But the j2ee app im making, i just pass the db url in the descriptor and the app server automatically creates the connection for my app. So where would i put exception handling?
    2. how can i stop my MDB from processing the same
    message?Guaranteed delivery is not supposed to stop
    processing. It will continue to process the message
    after certain intervals till the message is
    delivered. You shouldn't deliver it at all, if you
    are able to detect that the database is off
    The problem here is that my MDB automatically retrieves the message from the JMS queue server. Im not the one retrieving the messages manually.
    My assumed behavior of topic MDB is once the a certain MDB retrieves a message it will not retrieve the same message anymore.
    thank you in advance.
    leigh

  • [Fwd: Re: rdbms realm and connection pool]

    Hi,
    One reason why I would like to use the connection pool for the RDBMS
    realm is because there is the retry machanism built into the connection
    pool. With this retry, I don't need to re-start WebLogic if the DB
    server is somehow re-started. With the current implementation, all the
    connections maintained by the realm will become invalid if the DB server
    has been restarted independently.
    -------- Original Message --------
    Subject: Re: rdbms realm and connection pool
    Date: Wed, 27 Sep 2000 09:32:47 +0100
    From: "Terry" <[email protected]>
    Reply-To: "Terry" <[email protected]>
    Organization: BEA SYSTEMS Inc
    Newsgroups: weblogic.developer.interest.security
    References: <[email protected]>
    I believe not- the realm restricts access to connection pools to those
    who
    are allowed it, so if the realm needs the connection pool to start up,
    and
    you can't open the connection pool without the realm then you have a bit
    of
    a no-chicken and no-egg situation, which is I believe one of the reasons
    why
    there is no use of connection pools, ejbs, jndi, servlets etc. in the
    realm
    (along with other reasons, like why would it be provided with a servlet)
    The delegate pool acts somewhat similarly to a connection pool, and can
    even
    use the same database, so I'm not sure what the advantage would be
    Terry
    Nirmala devi <[email protected]> wrote in message
    news:[email protected]..
    >
    I think the rdbms realm uses different connection as it need to be setbefore
    the connection pool for Database.Is there any that i can point my rdbmsrealm to use
    the connection pool for Database instead
    Thanks in advance
    Nirmala

    I believe not- the realm restricts access to connection pools to those who
    are allowed it, so if the realm needs the connection pool to start up, and
    you can't open the connection pool without the realm then you have a bit of
    a no-chicken and no-egg situation, which is I believe one of the reasons why
    there is no use of connection pools, ejbs, jndi, servlets etc. in the realm
    (along with other reasons, like why would it be provided with a servlet)
    The delegate pool acts somewhat similarly to a connection pool, and can even
    use the same database, so I'm not sure what the advantage would be
    Terry
    Nirmala devi <[email protected]> wrote in message
    news:[email protected]..
    >
    I think the rdbms realm uses different connection as it need to be setbefore
    the connection pool for Database.Is there any that i can point my rdbmsrealm to use
    the connection pool for Database instead
    Thanks in advance
    Nirmala

  • How to pull data from EJB and present them using Swing ?

    Hi all,
    I've written stateful session bean which connect to Oracle database, and now I must write stand alone client application using Swing.
    The client app must present the data and then let users add,delete and edit data and it must be flexible enough to iterate through the records.
    The swing components can be JTextField,JTable etc.
    How to pull the data from EJB and present them to users with the most efficient network trip ?
    Thanks in advance
    Setya

    Thanks,
    Since the whole app originally was client-server app and I want to make it more scalable, so I decide to separate business logic in the EJB but I also want to keep the performance and the userfriendliness of the original user interface, and I want to continue using Swing as the original user interface does.
    I've read about using Rowset and I need some opinions about this from you guys who already have some experience with it.
    Any suggestions would be greatly appreciated.
    Thanks
    Setya

  • EJB and JavaMail

    Hi,
    I have developed an EJB for sending emails using the javamail api.
    My problem is that when i run the same code using the a standalone java application (i have pasted the code from the EJB) and try sending mails outside the my companies domain the mails are going.
    However when i try sending the mails using the JSP end EJB the mails are not going.
    I noticed that in the standalone java application the protected method getPasswordAuthentication gets called by the system. However the same is not getting called in the EJB.
    I am new to this technology. Can anyone please help me out here.
    I am sending the code also that i am using:-
    // Get all the system properties
    Properties props = System.getProperties();
    props.put("mail.smtp.host", "HOSTNAME");
    props.put("mail.smtp.auth", "true");
    SetAuthentication auth = new SetAuthentication();
    Session session = Session.getInstance(props, auth);
    session.setDebug(true);
    // Create a message
    Message msg = new MimeMessage(session);
    try {
    // Set the From Address
    Address addrFrom =new InternetAddress("[email protected]");
    msg.setFrom(addrFrom);
    // Set the TO address
    Address addrTo = new InternetAddress(strTo);
    msg.setRecipient(MimeMessage.RecipientType.TO, addrTo);
    // Set the subject of the mail
    msg.setSubject(strSubject);
    msg.setContent(strContent, "text/plain");
    msg.saveChanges();
    Transport.send(msg);
    // Code in class SetAuthentication
    private PasswordAuthentication auth;
    public SetAuthentication() {
    super();
    auth = new PasswordAuthentication("user", "password");
    protected PasswordAuthentication getPasswordAuthentication() {
    return auth;

    Hi,
    I have worked on JBoss and Weblogic app servers and one can initialize java mail settings in the app server,.I am sorry, i don't know how its done in the app server you are using.
    I would suggest you to try the following :
    static {
    /* Setting Properties for STMP host */
    props = System.getProperties();
    props.put("mail.smtp.host", "PUT SMTP SERVER HERE");
    props.put("mail.smtp.auth", "true");
    session = Session.getDefaultInstance(props, null);
    try {
    MimeMessage message = new MimeMessage(session);
    message.setRecipient(Message.RecipientType.TO,
    new InternetAddress(this.to));
    message.setFrom(new InternetAddress(this.from));
    message.setSubject(this.subject);
    message.setText(this.message);
    Transport transport = session.getTransport("smtp");
    transport.connect("PUT SMTP SERVER HERE", "PUT USERNAME HERE", "PUT PASSWORD HERE");
    message.saveChanges();
    transport.sendMessage(message, message.getAllRecipients());
    transport.close();
    } catch (MessagingException e) {
    throw new Exception(e.getMessage());

  • EJB IIOP connection failed

    I got the following message "Cannot connect to service: sess_iiop://localhost:2482:test" when I try to deployment EJB and I use the 8.1.7. and Jdev 3.2. Please advise what is wrong for my IIOP connection. From the listener.log, the connection looks good.
    ======================================
    Compiling the project...done
    Validating the profile...done
    Initializing deployment...done
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    *** Archive generation completed ***
    *** Deploying the EJB to 8i JVM ***
    EJB deployment argument list:
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw"
    "-DPATH=C:\Program Files\Oracle\JDeveloper 3.2\bin;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\bin"
    -classpath
    "C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDeveloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\auro
    a\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\xmlparserv2.jar"
    oracle.aurora.ejb.deployment.GenerateEjb
    -u
    scott
    -p
    tiger
    -s
    sess_iiop://localhost:2482:test
    -republish
    -keep
    -temp
    TEMP
    -descriptor
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Demo\EJB\DemoHelloEJB.xml"
    -oracledescriptor
    C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Demo\EJB\DemoHelloEJB_oracle.xml
    -generated
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Demo\EJB\DemoHelloEJBGenerated.jar"
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Demo\EJB\DemoHelloEJBSource.jar"
    Cannot connect to service: sess_iiop://localhost:2482:test
    *** Errors occurred while deploying the EJB to 8i JVM ***
    *** Deployment completed ***
    ============================================
    null

    I have had teh same problem while deploying ejb with deployejb
    tool.. where is teh problem?
    I got the following message "Cannot connect to service: sess_iiop://localhost:2482:test" when I try to deployment EJB
    and I use the 8.1.7. and Jdev 3.2. Please advise what is wrong
    for my IIOP connection. From the listener.log, the connection
    looks good.>======================================>Compiling the
    project...done>Validating the profile...done>Initializing
    deployment...done>Scanning project files...done>Generating
    classpath dependencies...done>Generating archive entries
    table...done>*** Archive generation completed ***>*** Deploying
    the EJB to 8i JVM ***>EJB deployment argument list:>"C:\Program
    Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw">"-
    DPATH=C:\Program Files\Oracle\JDeveloper 3.2\bin;C:\Program
    Files\Oracle\JDeveloper 3.2\java1.2\bin">-classpath>"C:\Program
    Files\Oracle\JDeveloper 3.2
    \aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper
    3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-
    rt.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \jdbc\lib\oracle8.1.7\classes12.zip;C:\Program
    Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program
    Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program
    Files\Oracle\JDeveloper 3.2
    \auro>a\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper
    3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2
    \aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \java1.2\jre\lib\rt.jar;C:\Program Files\Oracle\JDeveloper 3.2
    \lib\xmlparserv2.jar">oracle.aurora.ejb.deployment.GenerateEjb>-
    u>scott>-p>tiger>-s>sess_iiop://localhost:2482:test>-republish>-
    keep>-temp>TEMP>-descriptor>"C:\Program Files\Oracle\JDeveloper
    3.2\myprojects\Demo\EJB\DemoHelloEJB.xml">-
    oracledescriptor>C:\Program Files\Oracle\JDeveloper 3.2
    \myprojects\Demo\EJB\DemoHelloEJB_oracle.xml>-
    generated>"C:\Program Files\Oracle\JDeveloper 3.2
    \myprojects\Demo\EJB\DemoHelloEJBGenerated.jar">"C:\Program
    Files\Oracle\JDeveloper 3.2
    \myprojects\Demo\EJB\DemoHelloEJBSource.jar">Cannot connect to
    service: sess_iiop://localhost:2482:test>*** Errors occurred
    while deploying the EJB to 8i JVM ***>*** Deployment completed
    ***>============================================ >null

  • EJB to connect to EIS for SPI in Resource Adapter

              In the literature and the spec there is no mention of having the EIS be exposed
              as an EJB and the Resource Adapter have connections to the EJB via the SPI. What
              is everyones thought on this matter? There is tons of examples with JDBC and
              Socket Server stuff, but, little if any mention of having managed connections
              with an EJB.
              

    Welcome to the forum. Please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.

  • Expose ADF-BC as ejb and use it in UI from the datacontroller

    Hi Experts.
    Here i am looking forward some experts view and guidelines on this deployment architecture question. Currently i have deploped one ADF Web fusion application which has ADF-BC and web. In that web project datacontroller side i can be able to see the view object instances under each business service. Also the web has some UI bindings too. Now the application is working fine fine on one weblogic instance.
    question1) Can i deploy this above project into two weblogic instances one with ADF-BC model ( if yes how to deploy that alone) and the other web into the another instance. ( If yes can to configure the project)
    question 2) Now can i expose the ADF-BC as ejb and use it in the same way in the web (like drag and drop from the Data controller). ? I tried the option expose the ADF-BC as ejb In this case if the VO instance access methods are not exposed. So how can i access them in the UI? For example, assume if we have 2 view object EmployeeView and DepartmentView in the application module, then after immediately create the AM, the datacontrol shows the view object instances name like EmployeeView1, DepartmentView1 and also in the web we just drag and drop to create appropriate UI. This is fine. Now i create the ejb based on the AM. In the Remote interface i have the
    void removeEntity(Object entityDTO)
    method. If i look at the datacontrol section still the data controls remains same. I think this datacontrol still shows the ADF-BC direct connectivity. If i try to create the new ejb data control which points to the same AM ejb for web, then i couldn't see the above view instance name called EmployeeView1, DepartmentView1, where i can drag and drop in the UI.
    I can only see methods like EJBHome etc.....
    So this means i cannot use the Exposed EJB from the ADF-BC Application Module to drag and drop in UI like the ADF-BC direct unless we explicitly create the view access methods in the interface. Am i correct?
    Or still am i getting the wrong assumption.
    Much appreciated if u point some code to understand this.
    -t

    Thanks for the reply.
    Basically we have found the way to expose the ADFBC as ejb and use it for data binding in the UI. I will update this thread soon about our finding. But now i have an architecture question, can we deploy as 3-tier deployment for ADF-BC using the exposed ejb interface? Because i am worrying we might run into some ADF issue in furture if we move this path. Oracle gurus please share your ideas or thoughts.
    -t

  • Propagation of ctx between EJB and JSP

    Hello,
    Does anybody know how to propagate the Security
    Context between EJB and JSP so that when I login in my JSP page the user will be after recognized in my EJB system ?
    Thanks
    Francesco

    try this...as a test..
    take a simple Contact ejb (as simple as you can make it, just a name and email address). In the ejb-jar.xml set up a role, for example, user, and restrict the access to only this role for all methods.
    try to access the ejb from a jsp, and you should get the login form identified in your web.xml file.
    make sure that the ejb is noted in the web.xml file, also.
    this should work...
    no try this...identify a role in your web.xml file, (user, for example) and restrict the access to the a particular jsp which is not calling the ejb. IF you navigate to this jsp, you should get the login prompt...
    this should work....
    now the tough part
    in your application.xml create a role with the same name, user. By doing this, you have created a global role, and connect the two together.
    Now point your browser to the restricted jsp with no calls to the ejb...you should get the login, so login in.
    now navigate to your jsp which is unrestricted, but calls the restricted ejb...
    there should now be no login prompt.
    This should work.

  • EJB and Web Services

    Hi,
    I have created a EJB project with Stateless Session Bean having just one method, Java persitence (connnection to MS SQL). I have added this project to the Enterprise project as well.From the context menu when I select to create Web Service. The method is not selectable.
    What is going wrong?
    Can somebody please help?
    Best regards,
    Dharmi

    Hi Dharmi,
    How did you do that? Create an EJB which connects to MS SQL?
    Are there specific jars or something that have to be added to the EJB?
    Did you also have to install a SQL server driver and such?
    Can you provide a step-by-step for the creation of an EJB which gathers data from MS SQL?
    Kind regards
    Allan

  • Help with EJB and JNDI, please

    Hello. My name is Santiago, and i am a student from the University of Valladolid, in Spain. I am newcome in the world of EJB, I have done the first EJB from de Sun tutorial (I�m using the Sun Java System Application Server PE 8.2) and now I am trying to improve it in that way: I have the EJB and the client in diferent machines conected.
    I am trying to understand how to use JNDI, but i have not good results :( I have read about using ldap but i dont know if it is apropiated, or if it is installed automaticaly with the sun aplication, or if i have to download and install it... i am not sure about anything :)
    This is my client�s code (part of it)
    Hashtable envirom = new Hashtable();
    envirom.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    envirom.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
    envirom.put(Context.PROVIDER_URL,"iiop://Santiago:389");
    envirom.put(Context.PROVIDER_URL,"ldap://192.168.1.101:389");
    envirom.put(Context.SECURITY_AUTHENTICATION,"none");
    InitialContext ctx = new InitialContext(envirom);
    Object objref = ctx.lookup("java:comp/env/ejb/Multiplica");
    When I try to connect in local mode (client and EJB in the same machine) i get something like that:
    javax.naming.CommunicationException: 192.168.1.101:389 [Root exception is java.n
    et.ConnectException: Connection refused: connect]
    at com.sun.jndi.ldap.Connection.<init>(Connection.java:204)
    at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
    at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1578)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
    It is even worse when i try it in different machines:
    10-mar-2006... com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImp1<init>
    ADVERTENCIA: "IOP00410201: <COMM_FAILURE> Fallo de conexion: Tipo de socket: IIOP_CLEAR_TEXT;
    name of host: portatil; puerto: 3700"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code:201 completed:No
    Both SSOO are XP and I have disabled Firewalls.
    PLEASE, if you colud help me It would fantastic, because I am in that trouble, i have tryed 1000 solutions but i am not able to understand it.
    Hoping you can help me.
    Santiago.

    This thread is now being followed up in:
    http://swforum.sun.com/jive/thread.jspa?threadID=64092

  • Connection ==null and Connection is closed, difference

    Hi experts,
    I wonder what are the differences between "Connection==null" and "Connection is closed"?
    I closed a connection on one JSP page after a bean has retrieved data. Then, on the same page I call another bean to connect to the database. Because the Connection object has been created earlier, therefore Connection is not NULL, but it is closed. So, the second bean has to initiate another connection(if I knew how to test the "closed" status)
    Is it true that if the Connection is closed, then it should become null?
    I think I must have make quite a few mistakes in above statement:). Please help. Thanks a lot.

    connection.isClosed() will tell you if the connection object is closed or not. If it is closed, then the connection object can be dropped because you will not be able to create any new statements from that connection object. Just recreate another connection to use when this occurs.

  • Connection pool and Connection factory difference?

    Hi,
    Can someone clarify the difference between connection pool and connection factory.
    I know connection pool is some thing like a pool of database connection manitained at one place so that an application or client can use it when it requires.
    Then wat exactly is connection factory..say in 10g we always put a connection factory name in all adapters and acces the data sources like DB ,FTP,AQ ..etc
    can someone clarify??
    regards,

    To conserve system resources and to improve the performance of transactional applications, WebLogic allows you to define a pool of client connections (generally database but may be a FTP,FILE etc. as well)
    A Connection Factory object encapsulates a set of connection configuration parameters that has been defined by an administrator. A client uses it to create a connection with a service provider (generally JMS).
    Regards,
    Anuj

  • Printer offline when it is on and connected to wifi

    We have a HP Officejet Pro 8100 that says it is offline when connected to the wifi. Everything was fine until recently. Now when you try to print it says the printer is offline when there is power and connection. Any help would be great!

    Hi,
    Download and run HP print and Scan Dr utility from link below to diagnose the issue.
    www.hp.com/go/tools
    Although I am an HP employee, I am speaking for myself and not for HP.
    --Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • Cisco Jabber for Windows in Extend and Connect mode and making outbound calls

    Hi guys,
    I've set up Cisco Jabber for Windows to use Extend and Connect to control a remote PBX endpoint. I've configured the required CTI-RD device, remote destinations, associated the users to the line and added the devices to end-user controlled device. The extend and connect part is working flawlessly without any issues. I'm able to receive inbound calls on the remote PBX endpoint and control the call (hold, resume, transfer etc.) using the Jabber call window that pops up.
    However, I'm unable to make any outbound calls via the Jabber client when in extend and Connect mode. Reading the Extend and Connect guide, I need to configure Dial Via Office (DVO) Reverse. So when the user initiates a Dial-Via-Office reverse call, CUCM calls and connect to the Extend and Connect device (CTI-RD). CUCM then calls and connects to the number the user dialled and finally connects the two call legs.
    After attempting to configure DVO-R for Jabber for Windows in Extend and Connect mode following the CUCM feature services guide, i'm unable to get any outbound calls working. From RTMT, i am receiving the following Termination Cause Code: (27) Destination out of order. What i also notice is that there is no calling number for that trace either. I would've thought that the calling party would've been the Enterprise Feature Access (EFA) number.
    Has anyone got this working or can provide some guidance?
    Thanks.

    Hi guys,
    I've set up Cisco Jabber for Windows to use Extend and Connect to control a remote PBX endpoint. I've configured the required CTI-RD device, remote destinations, associated the users to the line and added the devices to end-user controlled device. The extend and connect part is working flawlessly without any issues. I'm able to receive inbound calls on the remote PBX endpoint and control the call (hold, resume, transfer etc.) using the Jabber call window that pops up.
    However, I'm unable to make any outbound calls via the Jabber client when in extend and Connect mode. Reading the Extend and Connect guide, I need to configure Dial Via Office (DVO) Reverse. So when the user initiates a Dial-Via-Office reverse call, CUCM calls and connect to the Extend and Connect device (CTI-RD). CUCM then calls and connects to the number the user dialled and finally connects the two call legs.
    After attempting to configure DVO-R for Jabber for Windows in Extend and Connect mode following the CUCM feature services guide, i'm unable to get any outbound calls working. From RTMT, i am receiving the following Termination Cause Code: (27) Destination out of order. What i also notice is that there is no calling number for that trace either. I would've thought that the calling party would've been the Enterprise Feature Access (EFA) number.
    Has anyone got this working or can provide some guidance?
    Thanks.

  • I have pluged a portable battery to the USB and my macbook pro stopped working after that, right before it shut down there was a message on the screen that said something like " USB device is withdrawing so much power, please disconnect and connect again?

    I have plugged a portable battery to the USB and my macbook pro stopped working after that, right before it shut down there was a message on the screen that said something like " USB device is withdrawing so much power, please disconnect and connect again?
    if the device I connected have caused this, shouldn't the macbook itself have some type of protection that should prevent this from happening.
    because when I took it to an apple certified maintenance shop, the guy said that now it could only run while connected to the power. it won't run on batteries. and that I have to change the motherboard.
    can I just replace the damaged part only, would apple consider this as a design issue and they could pay for it, or should I just buy a new motherboard for 800$.
    Help.

    BB1B2,
    The problem is in finding a tech shop that will/can do board level repairs on Macs. They are few. And I certainly wouldn't spend $800 on a new logic board - I would replace the computer if I had to pay that much!
    You could call around to a few repair shops and see if they feel competent to isolate the problem and do a board level repair - but I'm afraid, in the end, that your search will be futile.
    Sorry,
    Clinton

Maybe you are looking for

  • Buying an external DVD burner, what to look for?

    Hi, I am buying an external DVD burner in the morning, anything I should look for feature wise, any models which are recommended? Cheers, S.

  • Mac Os X 10.5.8 to Snow Leopard 10.6.0.

    First things I'm really sorry for my bad English.. I'm italian.. but I have a urgent question... My mac Have Mac Os x 10.5.8.. I try to search Snow Leopard on the Apple Store but there isn't there... So what can I do right now? Where I can buy the Sn

  • Sleep Function in PL/SQL

    Hi Guys, I am creating a procedure which will check for the fileld in the database and if it returns NULL should go to sleep for 15 minutes and then will again check for the field. I am planning to use DBMS_LOCK.SLEEP function. Please can you suggest

  • How to make a sales order item deleted in ECC while in CRM just status changed?

    Hi expert, I have a requirment, that is: 1. the user will change the USER STATUS in a line item of sales order to "CANCEL". 2. When the order was replicated to ECC,the item should be deleted totally and the ITEM in CRM should not be affected. How can

  • Alerts missing characters

    Hi, In SharePoint, we have an announcements list with an alert for all the users (when a new item is added). Sometimes in the alert (the mail that we receive), there is 1 random character missing. The announcements we place contains all alphabetic le