EJB and JNI

I have a product write by JNI to call some java object on server side. Like
VB -> JNI bridge -> client jar -> (RMI) -> server.
Now the server was changed to J2EE & EJB2.1. The procedure become
VB -> JNI bridge -> client jar -> (EJB) Server
I tried to call the EJB from VB thought JNI, the bridge was crash when JNI try to create object that define in java (in Client jar).
My question is �Does JNI can work with EJB?�. Where I can find example of how to compile or any related information?
Thanks!

Thank you so much!
My JNI like next, error is happen on NewObject
     Jc= WJC::getClass("/MyJar/myClass");
     if(Jc==0){ error=WJC::getError(); return; }
     jmethodID constructor= WJC::getMethodID(Jc,"<init>","()V");
     if(constructor==0){error="Impossible to find 'myClass' constructor method ID";return;
     Jthis= WJC::getEnv()->NewObject(Jc, constructor);
In RMI version,this program works well. In EJB version, "myClass" have no change at all. Only different is "myjar" modified for access EJB.
Do I need change somthing in my Jar?

Similar Messages

  • Jca  and  jni

    I hope some one can answer this question , as there is no much to read about JCA
    my J2EE application needs to inetgerate with some C libraries, after some investigations , I found that calling native APIs direct from the EJBs might crash the EJB container when the JNI fails, as a better solution the JCA can be used as an intermediate layer, regarding the JCA-JNI communication I have 2 questions:
    1- Is this setup EJB->JCA->JNI->C failsafe against the failure in the JNI->C part?
    2- can the JNI wrapper be hosted on a remote server other than the application server or will I need to install the application server on the same machine as the C libraries

    1) If you mean, does the app server continue running if your native code coredumps, the answer is no - This is the tradeoff you pay for speed.
    2) Yes, but you're no longer going JCA->JNI. Rather, you're going JCA->X->JNI where X is some remotable protocol.
    JCA is no magic layer - It's just a Java API between application servers and whatever library you intend to expose to your app server clients.
    God bless
    -Toby Reyelts

  • 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

  • Can EJB and BC exist at the same time in one project?

    having to use ADF's BC and EJB to access data in both way due to the special requirements, but I am always getting the deployment failure.
    can Ejbs and BC components exist at the same time in one project?

    thanks for your reply.
    I considered to separate the BC and EJB as the separate project. I just use the EJB component to implement the dynamic tree menu, whether a little make a mountain out of a molehill if you as a separate project.

  • WLS 8.1 two domains with EJB and webapp deployed has JVM conflicts?

    Test configuration environment:
    Windows 2003 server installed with weblogic 8.1 server and oracle 9i.
    This weblogic server have two domains, one is for EJB deployment, the other is a webapp that implements accessing to oracle through EJB.
    The issue is when we tested a method provided by the EJB that uses double to calculate some total value, the result was correct. But when we tested it using webapp that was deployed on the same server of EJB, it's result was negative or zero.
    I think the reason is that the JVM which both EJB and webapp used for calculation was the same and may made some conflicts when they run at the same time.
    Any suggestion would be greatly appreciated.
    Thank you in advance!
    Shuaibing
    Message was edited by:
    linuxapple

    This morning I deployed that webapp to the Domain that deployed the EJB, The results of calculating in webapp's jsp was correct.
    Any one be kind enough to tell me what the calling JVM differences between single domain(deployed by EJB and webapp) and two domains (deployed EJB and webapp separately)?

  • How to master good design with EJB and JSP?

    I use JSP to calling EJB. But the .jsp file is complex and it's difficult to maintain...I just want to work higher efficent with EJB,JSP and JavaBean. I want to know is there a good design with EJB and JSP? and is there any good material about MVC for EJB,JSP and JavaBean?

    You should read the J2EE blueprint available on this website. Better download the PDF, and print it for yourself so you can read it anytime.

  • How to set classpath to EJB and Servlets

    Hi all,
    How can I add a classpath to EJB and Servlets in Weblogic 6.1, so that that classpath
    can be achieved by both EJB jar and war file? I have deployed a .ear file having
    the jar and war files. Now the EJBs inside the jar file are not reaching the class
    files of the war file and the class files in the war file are not reaching to
    the EJBs. Please let me know at the earliest.
    Atanu

    Hi.
    You might try looking at the petstore example which combines webapps (war files) with
    ejbs in an ear file to see how to do this. It may be a simple config problem.
    Regards,
    Michael
    Atanu Dey wrote:
    Hi all,
    How can I add a classpath to EJB and Servlets in Weblogic 6.1, so that that classpath
    can be achieved by both EJB jar and war file? I have deployed a .ear file having
    the jar and war files. Now the EJBs inside the jar file are not reaching the class
    files of the war file and the class files in the war file are not reaching to
    the EJBs. Please let me know at the earliest.
    Atanu--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Where do I put classes shared between EJBs and WAR

    I have written some ValueObject classes stored in their own jar, they are used by a number of ejbs and and a Web application WAR. I have packaged the thing up as a single EAR but neither the EJBs or the jsps can see these classes.
    How do I share these classes at each end. is their a general deployment descriptor solution or is it application server specific.
    I am deploying to IBM Websphere 6

    verify .classpath file under your web folder for both options
    Sorry, what do you mean is their a classpath value in the xml descriptors. I put my ValueObject into a jar within the WEB-INF\lib of the WAR but these arent seen by the EJBs which are within the EAR but not the WAR. Im not aware that there is a seperate WEB-INF directory for the EAR.
    Structure as follows
    app.ear
            testejb.jar
            META-INF
            testweb.war
                   test.jsp
                   META-INF
                   WEB_INF
                         classes
                              testui.class
                         lib
                             valueobjects.jar

  • 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

  • Differences between @EJB and @Resouce?

    Hi,
    I am confused about the differences between @EJB and @Resource?
    1.
    Can Session Beans be injected for both?
    If so what are the pro's / con's?
    2.
    Are the any difference between the type of components that cna be registered for one but not the other?
    3.
    Are they both equally usable with the ENC?
    Many thanks.

    @EJBs are 'special' resources. For example, @EJB (for a stateful session bean) results in
    1. Creation of the Stateful Session Bean,
    2. Other dependencies are injected into this newly created bean,
    3. If the bean has a @PostConstruct bean then that method is invoked (after invoking applicable interceptors)
    Hope this helps

  • Swing GUI and JNI

    Hello
    I am facing a problem related to Swing and JNI. Actually I have to call a native function on the action of a button, so I am using Swing to develop GUI. When I use Jframe and Jbuttons and on the action event of JButton when I call the native function of a different class, then the function works fine but suddenly program gets terminated. Program does not get terminated when I click on other buttons but when I click on the button containing native method, after clicking, the whole GUI frame gets removed and the program terminates. While debugging it does not give any error, infact the function works perfectly fine and the only thing that I came to know is that the application gets terminated and it displays "terminated, exit value : - 1073741819"
    Please help me out and reply as soon as possible.

    I imagine it depends on what's in the JNI code. Is this a JNI that you've created? Is it a large program? Can you post the code? Are you sure that you're compiling the C/C++ code with the correct parameters? (you may need to ask some of this in the JNI forum) Is it thread-safe? Are you calling its methods on the EDT?

  • RE: design patterns involving EJBs and JDO

    Is the idea that you specify in some config file (xml?) the methods of
    your session bean, whether its stateful or stateless, the default bean
    transaction semantics, etc, then say "go" and it generates the home and
    remote interfaces and the skeletal session bean class?
    -----Original Message-----
    From: Eric Lindauer [mailto:[email protected]]
    Sent: Monday, June 25, 2001 8:26 AM
    To: JDO-ListServ
    Subject: Re: design patterns involving EJBs and JDO
    I don't think it's publicly available yet, I used to work there and was
    helping out a little with testing. I'll tell you in advance, it really
    works well. Much like the JDO implementation, the process of turning
    things into SesisonBeans is very transparent to the developer. I guess
    TT is going to make it available in another week or two, as time
    permits.
    ----- Original Message -----
    From: Matthew <mailto:[email protected]> Adams
    To: '[email protected]' <mailto:'[email protected]'>
    Sent: Monday, June 25, 2001 11:18 AM
    Subject: RE: design patterns involving EJBs and JDO
    IMHO, JDO replaces entity beans, but you'll have to decide for yourself.
    My recommendation would be to use session beans exclusively.
    Where do you get TechTrader's "SessionBean Creator"? What are its
    features? How do you use it?
    -----Original Message-----
    From: Eric Lindauer [mailto:[email protected]]
    Sent: Monday, June 25, 2001 8:12 AM
    To: JDO-ListServ
    Subject: design patterns involving EJBs and JDO
    Hi,
    I was just wondering, if you are using JDO for persistence, does it
    matter whether you wrap your objects with proxy EntityBeans or
    SessionBeans? I am currently demoing TechTrader's SessionBean creator,
    which makes means that for me creating SessionBeans is much easier than
    creating EntityBeans. I am currently using stateful SessionBeans to
    wrap the JDO objects, simply dropping them when the bean is passivated
    and refinding them ( they'll already be in the cache ) when the bean is
    activated.
    My main advantage in doing it this way is SessionBeans are so much
    easier to create. Do you see any problems looming, or any other
    advantages to this decision?
    Thanks in advance.
    Eric

    I don't think it's publicly available yet, I used to work there and was
    helping out a little with testing. I'll tell you in advance, it really
    works well. Much like the JDO implementation, the process of turning
    things into SesisonBeans is very transparent to the developer. I guess
    TT is going to make it available in another week or two, as time
    permits.
    ----- Original Message -----_
    From: Matthew <mailto:[email protected]> Adams_
    To: '[email protected]' <mailto:'[email protected]'>
    Sent: Monday, June 25, 2001 11:18 AM
    Subject: RE: design patterns involving EJBs and JDO
    IMHO, JDO replaces entity beans, but you'll have to decide for yourself.
    My recommendation would be to use session beans exclusively.
    Where do you get TechTrader's "SessionBean Creator"? What are its
    features? How do you use it?
    -----Original Message-----
    From: Eric Lindauer [mailto:[email protected]]
    Sent: Monday, June 25, 2001 8:12 AM
    To: JDO-ListServ
    Subject: design patterns involving EJBs and JDO
    Hi,
    I was just wondering, if you are using JDO for persistence, does it
    matter whether you wrap your objects with proxy EntityBeans or
    SessionBeans? I am currently demoing TechTrader's SessionBean creator,
    which makes means that for me creating SessionBeans is much easier than
    creating EntityBeans. I am currently using stateful SessionBeans to
    wrap the JDO objects, simply dropping them when the bean is passivated
    and refinding them ( they'll already be in the cache ) when the bean is
    activated._
    My main advantage in doing it this way is SessionBeans are so much
    easier to create. Do you see any problems looming, or any other
    advantages to this decision?
    Thanks in advance.
    Eric_

  • Using EJB and CommandBean as Model in WD

    Hi Experts,
    I'm quite new to DI. My problem is, I created an EJB which is accessing a DB. Now I created a commandBean which accesses the EJB. I want to use this commandBean as beanModel in WD. I created public parts for the CommandBean but when I want to create the model in WD-Perspective and choose used dc as source, I can't find the jar file of the commandBean, that I wanted to expose with the public parts. Do I create public parts the wrong way? Or what could be the error? Is my approach correct in using a commandBean to access the EJB and use the CommandBean as Model?
    When I want to create the jar file of the CommandBean I get the following messages:
    JAR creation failed. See details for additional information.
      Problem writing /DI1_TP1IP1_Dzvejbhelpcom.bla/src/packages/com/sap/bla/MyCommandBean.jar to JAR: duplicate entry: com/sap/bla/MyCommandBean.jar
      Problem writing /DI1_TP1IP1_Dzvejbhelpcom.bla/bin/com/sap/bla/MyCommandBean.class to JAR: duplicate entry: com/sap/bla/MyCommandBean.class
      Problem writing /DI1_TP1IP1_Dzvejbhelpcom.chiron/src/packages/com/sap/bla/MyCommandBean.java to JAR: duplicate entry: com/sap/bla/MyCommandBean.java
    But the jar file is created? Could it be corrupted?
    Any help is appreciated
    Regards Manuel

    Hi Stefanie,
    you're right. Web Services is the better approach. So I wanted to use a web service and created a session bean wich calls my entity bean. I created a web service around the session bean. But when I want to deploy the ear-Project with the web service I get the following exception. I already checked sdn for this problem, but I could'nt find the solution:
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application com.chiron/zv_ear.. Reason: Webservices common deployment exception! The reason is: Error occurred, trying to update web services for application com.chiron/zv_ear. . Additional info: none; nested exception is:      java.lang.Exception: com.sap.engine.interfaces.webservices.server.deploy.WSDeploymentException: Webservices common deployment exception! The reason is: Error occurred, trying to update web services for application com.chiron/zv_ear. . Additional info: none
         at com.sap.engine.services.webservices.server.deploy.ws.update.WSUpdateProcessor.updateWebServices(WSUpdateProcessor.java:164)
         at com.sap.engine.services.webservices.server.deploy.ws.update.WSUpdateProcessor.updateWebServices(WSUpdateProcessor.java:118)
         at com.sap.engine.services.webservices.server.deploy.ws.update.WSUpdateProcessor.updateWebServices(WSUpdateProcessor.java:86)
         at com.sap.engine.services.webservices.server.deploy.ws.update.WSUpdateManager.makeUpdate(WSUpdateManager.java:52)
         at com.sap.engine.services.webservices.server.deploy.WSDeployer.makeUpdate(WSDeployer.java:274)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.makeComponents(UpdateTransaction.java:400)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:321)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.begin(UpdateTransaction.java:164)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:326)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3184)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:669)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.interfaces.webservices.server.deploy.WSDeploymentException: Webservices deployment exception! The reason is: Error occurred, trying to generate web services deployment files for application com.chiron/zv_ear. . The error refers to application: none, jar: , web service: .
         at com.sap.engine.services.webservices.server.deploy.ws.update.WSUpdateProcessor.generateDeployFiles(WSUpdateProcessor.java:296)
         at com.sap.engine.services.webservices.server.deploy.ws.update.WSUpdateProcessor.deployWebServices(WSUpdateProcessor.java:262)
         at com.sap.engine.services.webservices.server.deploy.ws.update.WSUpdateProcessor.updateWebServices(WSUpdateProcessor.java:155)
         ... 21 more
    Caused by: com.sap.engine.interfaces.webservices.server.deploy.WSDeploymentException: Webservices common deployment exception! The reason is: Error occurred, parsing com.sap.engine.services.webservices.server.deploy.descriptors.sapwebservices.WSDescriptor descriptor, application com.chiron/zv_ear, web service zvglWS, location message: type: jar file, location: F:\usr\sap\TP1\JC00\j2ee\cluster\server0\.\temp\deploy\work\deploying\reader1197465981374\com.chiron~zv_model3.jar . . Additional info:
         at com.sap.engine.services.webservices.server.deploy.ws.WSDefinitionFactory.parseWSDescriptor(WSDefinitionFactory.java:907)
         at com.sap.engine.services.webservices.server.deploy.ws.WSDefinitionFactory.loadWebService(WSDefinitionFactory.java:176)
         at com.sap.engine.services.webservices.server.deploy.ws.WSDefinitionFactory.loadWebServices(WSDefinitionFactory.java:158)
         at com.sap.engine.services.webservices.server.deploy.ws.update.WSUpdateProcessor.generateDeployFiles(WSUpdateProcessor.java:284)
         ... 23 more
    Caused by: com.sap.engine.interfaces.webservices.server.deploy.WSDeploymentException: Webservices common deployment exception! The reason is: Error occurred, trying to parse documentation for web service zvglWS. . Additional info:
         at com.sap.engine.services.webservices.server.deploy.ws.WSDefinitionFactory.parseDocumentation(WSDefinitionFactory.java:1590)
         at com.sap.engine.services.webservices.server.deploy.ws.WSDefinitionFactory.parseWSDAndDocumentation(WSDefinitionFactory.java:1564)
         at com.sap.engine.services.webservices.server.deploy.ws.WSDefinitionFactory.parseWSDescriptor(WSDefinitionFactory.java:814)
         ... 26 more
    <b>Caused by: java.io.FileNotFoundException</b>: .\temp\webservices\deploy\com.chiron_zv_ear\webservices\com1\com\sap\chiron\zvglWSWsd.wsdef (The system cannot find the path specified)
         at java.io.FileOutputStream.open(Native Method)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
         at com.sap.engine.lib.jar.JarExtractor.extractFile(JarExtractor.java:232)
         at com.sap.engine.services.webservices.server.deploy.ws.WSArchiveFilesLocationHandler.getWsdInputStream(WSArchiveFilesLocationHandler.java:184)
         at com.sap.engine.services.webservices.server.deploy.ws.WSDefinitionFactory.parseDocumentation(WSDefinitionFactory.java:1574)
         ... 28 more
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment exception : The deployment of at least one item aborted
    I already removed the ear and deployed again. That works one time, after that I get the exception again. But even when it works one time, I can't find the web service in the web service navigator of the j2ee engine.
    Regards Manuel

  • EJB and Servlets

    Hi there,
    A frontend processing of HTTP request that pass thru WebLogic server that make
    API calls thru tuxedo to the application servers that eventually running C, C++
    that retrieve data from a backend database of Oracle.
    Being the services of EJB and Servlets, EJB is more kind of processes inside the
    server but Servlets can handle better in request and respond (talk to the client),
    whats your opinions in this kind of integration? Go for pure EJB or Servlets?
    Or shall mixed matched? and how should the architecture should looks like?
    Thanks
    Neo

    Sorry, wrong question, just ignore it.

  • 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());

Maybe you are looking for

  • Confirmation based on Work center

    Hi, Can we do Confirmation of Qty based on Work cetner? Means that i have Order Qty for 100Pc. in the same order i want to confirm the Qty in WC1 for 60PC and another Workcenter WC2 for 40 PC. To check the utilization of Work centers is there any pos

  • Is it possible to connect a 30" cinema display to the thunderbolt port?

    Hello everyone! I currently have a mac mini (2010) and a 30" Cinema Display hooked uo to the little bugger,my question would be if I purchase a new MBP 2011 w/ thunderbolt will I be able to use my 30" monitor as an external display ?

  • ERS Invoices via BAPI

    When a Purchase Order is marked as ERS relevant (self billing or self invoice), is it possible to post the incoming invoice using BAPI_INCOMINGINVOICE_CREATE? If so, how. I notice when I post an invoice with the BAPI on such a PO document, an invoice

  • Printing problem using Dot Net - fields are drifting off specified co-ords

    Hello I am writing a crystal report that requires exact positioning of data to fit preprinted stationery. I have achieved this satisfactorily in design mode (CR XI) and the report prints according to requirements from design mode. I have loaded the r

  • New OVI Calendar web application syncronization is...

    Hi @ll, I don't know about you, but I can't sync calendar events back & forth since last week (when Ovi Calendar 1.6 went from beta to live). No errors reported by the phone ovi sync app. It's just no calendar appointments being sent (contacts is wor