Use another ejb in MDB

I've got an EJB that can be used in servlet and another ejb. but when I tried to use it in a MDB(message-driven bean), it can find the home, but it will fail if invoking
the create method on the home.
WHY????
Any input would be appreciated.
Thanks

I've got an EJB that can be used in servlet and another ejb. but when I tried to use it in a MDB(message-driven bean), it can find the home, but it will fail if invoking
the create method on the home.
WHY????
Any input would be appreciated.
Thanks

Similar Messages

  • Using Session EJB from MDB in Weblogic 11G

    I am having trouble with what should be a very simple operation. I have created an MDB and deployed it successfully on the Weblogic managed server. Then in a separate application, I created a Stateless session bean that I would also like to call from the MDB. My SSB deploys and works fine. I added an @EJB annotation to the MDB so I could instantiate and access the SSB from the MDB. In order to resolve the interface class in jDeveloper, I went to my MDB project properties under libraries and classpath and added the jar file for my ejb.
    When I try to redeploy the MDB, I get a java.lang.ClassNotFoundException on the SSB interface class.
    Is there an example somewhere of how to properly create and configure all of the deployment packages and refereneces I need on the weblogic server? The SSB is a common service that going to be called by a lot of other MDBs in my system. Optimally, what I would like to do is to deploy the ejb-client.jar as a shared library so all of my MDBs can use it.
    Thanks for any pointers!

    I am using jDeveloper 11g, so both my MDB and SLSB were built and deployed using the wizzards in the IDE.
    The MDB is inside of an ejb-jar and deployed to a managed server. I am doing my development on a box that is resource challenged so I setup my WLS on a different box. There is an admin server (AdminServer) and a separate soa server (soa_server1) on which I have installed all of the SOA Suite packages.
    The SLSB represents a primary service for the system I am building. Service1SessionBean is deployed targeted to soa_server1. The MDB is also deployed to soa_server1. At least it was until I tried to add the EJB reference. Now it won't deploy at all.
    I would like to avoid packaging the Service1SessionBean client jar in with the MDB because there are several other EJBs that will also need to call the service. I would like to deploy the client jar as a shared library on soa_server1 so that any EJB artifacts that need to call it may do so, I have tried to deploy the client jar as a shared library using jDeveloper but when it deploys, it seems to be under the name "j2ee-app" rather than Service1SessionBean.

  • How tom invoke an EJB from another EJB using the sun rmi protocl in Weblogi

    Hi,
    I am particularly new to EJB.
    My scenario is
    client invoking-->EJB-----invoking ----(Either a webService or an EJB)
    in WEBLOGIC
    Is it possible that a call from EJB to another EJB or WebService use Sun's RMI as underlying protocol instead of t3 or IIOP which are used in Weblogic ?
    Would be really a great help if you could provide me some sample on it on weblogic.

    Hi Stefan,
    You don't need to provide the InitialContextFactory for running a standalone client. The following should work just fine:
    Context initial = new InitialContext();
    System.out.println("Looking up ...");
    Object objref = initial.lookup(EJB);  //the lookup name should be a global JNDI name      //and not from the java:comp namespace
    System.out.println("Looked up EJB");The JNDI implementation looks for the jndi.properties file in your classpath. So make sure that you have the appserv-rt.jar from your <server_installation>/lib directory in your classpath.
    HTH,
    Sheetal

  • Use transacted session in MDB

              Hi,
              If I use transacted session in MDB with container managed transaction, dose the
              weblogic ignore the transacted setting or start in it's own transaction. I looked
              the JMS Tutorial from Sun, the J2EE server just ignore the transacted setting,
              treated it as non-transacted session.
              Thanks
              

              Thanks, Greg. I created another XAQCF in MQ JMSADMIN, but still did not help. The
              strange part is when this exception happens, in the Event Viewer there is a Message:
              An internal Websphere MQ Error has occurred'. In the Trace Log of MQ, the Major
              Error Code reported is arcE_XAER_PROTO.
              Has anyone encountered this error? The same code works fine when enlist an XAQCF
              defined in Weblogic and PUT into a Weblogic JMS Queue instead within the same
              XA Transaction. I am attaching the stack trace to this message, just in case,
              someone has useful pointers to help me. May be this is MQ Specific though I made
              sure I have the latest FixPack for MQ installed.
              Thanks,
              Sridhar
              "Greg Brail" <[email protected]> wrote:
              >Yeah. This comes up from time to time. MQ is upset because it wants to
              >be
              >enlisted in the JTA transaction, but JTA is not enlisting it because
              >it
              >thinks it's already enlisted. It thinks it's already enlisted because
              >the
              >same MQ connection factory was used for the MDB input queue, even though
              >it's a different JMS connection and session.
              >
              >You can avoid this by creating another "XAQCF" object in the MQ JNDI
              >space
              >and giving it a different name. If you do that -- essentially use different
              >connection factories for the MDB's input and output queues -- then this
              >will
              >work.
              >
              >Also, the transaction enlistement code in 8.1 that supports the
              >"resource-ref" feature avoids this problem.
              >
              > greg
              >
              >"Sridhar Krishnaswamy" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Hi Greg:
              >> I assume you meant to getXAResource() from an Object of type
              >XAQueueSession. Here
              >> is the code I tried within the onMessage() method of the MDB:
              >>
              >> XAQueueConnectionFactory factory = (XAQueueConnectionFactory)
              >ctx.lookup("XAQCF")
              >> ;
              >> XAConnection connection = factory.createXAQueueConnection() ;
              >>
              >> XAQueueSession mqSession = connection.createXAQueueSession() ;
              >> XAResource mqResource = mqSession.getXAResource() ;
              >> Transaction tran = TxHelper.getTransaction() ;
              >> tran.enlist(mqResource) ;
              >>
              >> //Then I was going to get the QueueSession Object from XAQueueSession,
              >obtain
              >> the Queue
              >> //Object from JNDI, create the Sender
              >> //and call the send. But I commented out these calls. Even then, after
              >the
              >onMessage
              >> Method
              >> // completes, I get the following error:
              >>
              >> javax.transaction.SystemException: start() failed on resource
              >'com.ibm.mq.MQXAResource':
              >> XAER_PROT : Routine was invoked in an improper context
              >> javax.transaction.xa.XAException: XA Operation failed. see errorcode
              >(which I
              >> am assuming is XAER_PROT).
              >>
              >> Any idea, what I am doing wrong?
              >>
              >>
              >>
              >>
              >> "Greg Brail" <[email protected]> wrote:
              >> >In 7.0, you can do your MQ "put" inside the same JTA transaction that
              >> >was
              >> >used to receive the message for the MDB, but you have to do the
              >transaction
              >> >enlistment yourself. Basically, you have to use the class
              >> >weblogic.transaction.TxHelper class to get a reference to the current
              >> >transaction, then call "enlistResource" on the transaction using the
              >> >JTA
              >> >"XAResource" that you get from the MQ JMS "Session" object. I'm sure
              >> >we've
              >> >posted the code in this newsgroup before, but I don't know where,
              >so
              >> >it
              >> >would look something like:
              >> >
              >> >// First, get the MQ QueueSession object you're going to use to send
              >> >the
              >> >message
              >> >QueueSession mqSession = mqConnection.createQueueSession(false, 0);
              >> >XAResource mqResource = mqSession.getXAResource();
              >> >weblogic.transaction.Transaction tran =
              >> >weblogic.transaction.TxHelper.getTransaction();
              >> >tran.enlistResource(mqResource);
              >> >// Now send your message
              >> >
              >> >In 8.1, this will still work, but it's not necessary. If you register
              >> >the MQ
              >> >XA connection factory as a "resource-reference" in your EJB deployment
              >> >descriptors and look it up using java:comp/env the way the documentation
              >> >link way below describes, then this transaction enlistment happens
              >> >automatically. This only happens when you use the "resource-reference"
              >> >feature (which means that old code will still work if it does NOT
              >use
              >> >this
              >> >feature), and it's only in 8.1.
              >> >
              >> > greg
              >> >
              >> >"Sridhar Krishnaswamy" <[email protected]> wrote in
              >message
              >> >news:[email protected]...
              >> >>
              >> >> Hi Greg:
              >> >> Is the Statement
              >> >>
              >> >> 'But in this case, you don't get a "non-transactional" session,
              >but
              >> >actually a
              >> >> session that participates in the current JTA transaction for the
              >thread
              >> >where
              >> >> your EJB is running'
              >> >>
              >> >> also true in the case of an MDB running in Weblogic 7.0 (Container
              >> >Managed
              >> >Transactions)
              >> >> driven by an XAQCF and a Foreign JMS Provider such as MQSeries?
              >In
              >> >other
              >> >words,
              >> >> if I want the MDB to PUT the Message into an MQSeries Queue, can
              >the
              >> >PUT
              >> >be invoked
              >> >> under the Context of the Same XA Transaction? My understanding is
              >that
              >> >WebLogic
              >> >> 7.0 doesn't support send
              >> >> messages out of an MDB within the same XA transaction if the MDB
              >is
              >> >> XA-driven by a foreign JMS provider. Please let me know if this
              >is
              >> >false.
              >> >If true,
              >> >> does Weblogic 8.1 also have this restriction?
              >> >>
              >> >> Thanks,
              >> >> Sridhar Krishnaswamy.
              >> >>
              >> >> "Greg Brail" <[email protected]> wrote:
              >> >> >What do you mean by "use transacted session in MDB?" Are you creating
              >> >> >a new
              >> >> >session inside your MDB, or do you mean something else?
              >> >> >
              >> >> >The only Sun thing I can think of is in code that looks like this:
              >> >> >
              >> >> >InitialContext ctx = new InitialContext();
              >> >> >QueueConnectionFactory qcf = ctx.lookup("java:comp/env/jms/QCF");
              >> >> >Queue queue = ctx.lookup("java:comp/env/jms/Queue");
              >> >> >QueueConnection connection = qcf.createQueueConnection();
              >> >> >// Create "transacted" session:
              >> >> >QueueSession session = connection.createQueueSession(true, 0);
              >> >> >QueueSender sender = session.createQueueSender(queue);
              >> >> >TextMessage message = session.createTextMessage("Hello, world");
              >> >> >sender.send(message);
              >> >> >connection.close();
              >> >> >
              >> >> >If you do this, and exactly this, inside an EJB, including the
              >use
              >> >of
              >> >> >"java:comp/env/jms", in WebLogic Server 8.1, then we do indeed
              >ignore
              >> >> >the
              >> >> >"transacted" flag when you create the session, just like Sun says
              >> >we
              >> >> >should
              >> >> >in the EJB and J2EE specs. But in this case, you don't get a
              >> >> >"non-transactional" session, but actually a session that participates
              >> >> >in the
              >> >> >current JTA transaction for the thread where your EJB is running.
              >> >> >
              >> >> >The idea is that if you are working inside an EJB, you don't use
              >> >transacted
              >> >> >sessions -- you use the transaction control given to you by the
              >EJB
              >> >> >container, including the UserTransaction interface and/or the various
              >> >> >container-managed transaction flags, rather than the JMS "transacted
              >> >> >session".
              >> >> >
              >> >> >You can find more information here:
              >> >> >
              >> >> >http://e-docs.bea.com/wls/docs81/jms/j2ee_components.html
              >> >> >
              >> >> > greg
              >> >> >
              >> >> >"Jen" <[email protected]> wrote in message
              >> >> >news:[email protected]...
              >> >> >>
              >> >> >> Hi,
              >> >> >>
              >> >> >> If I use transacted session in MDB with container managed
              >transaction,
              >> >> >dose the
              >> >> >> weblogic ignore the transacted setting or start in it's own
              >> >transaction.
              >> >> >I
              >> >> >looked
              >> >> >> the JMS Tutorial from Sun, the J2EE server just ignore the
              >transacted
              >> >> >setting,
              >> >> >> treated it as non-transacted session.
              >> >> >> Thanks
              >> >> >
              >> >> >
              >> >>
              >> >
              >> >
              >>
              >
              >
              [eRRORS.txt]
              

  • I m not getting connected to oracle 9i database using my ejb...

    hi i have made a simple ejb which simply connects to a database of oracle 9i using a datasource on oracle 10g application server...but now my problem is that when i am trying to deploy the ejb ..it is not getting deployed...it shows the following error..
    Deployment failed:nested exception
    resolution:
    base exception:
    com.evermind.server.rmi.OrionRemoteException
    Disconnected:Connection reset. Disconnected:Connection reset.
    the code i am using for EJB class is as follows
    package Simpapp;
    import javax.ejb.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    public class SimpappBean implements SessionBean {
        static final String DATASOURCE = "bajaj";
        static final String SQL = "select * from login ";
        DataSource ds;
        public String upper (String input) throws java.rmi.RemoteException {
         try {
             Connection conn = ds.getConnection ("bajaj10g","bajaj10g");
             Statement sql = conn.createStatement ();
             //sql.setString (1, input);
             ResultSet results = sql.executeQuery (SQL);
             if (results.next () == false) {
              System.out.println ("No rows for "+ input);
                  throw new java.rmi.RemoteException ("SQL failure");
             } // if
             String result = results.getString ("username");
             results.close ();
             sql.close ();
             conn.close ();
             if (result == null) {
              System.out.println ("NULL result for "+ input);
                  throw new java.rmi.RemoteException ("SQL failure");
             } else
              return (result);
         } catch (SQLException sqle) {
             System.err.println ("While executing SQL: " +
              sqle.getMessage ());
             throw new java.rmi.RemoteException ("SQL failure");
            } catch (Exception e) {
             System.err.println ("Unknown Exception: " +
              e.getMessage ());
             throw new java.rmi.RemoteException ("Bean Exception: " +
              e.getMessage ());
         } // catch
        } // simpapp
        public void ejbCreate () {
             try {
             Context ctx = new InitialContext ();
             ds = (DataSource) ctx.lookup (DATASOURCE);
         } catch (Exception e) {
             System.out.println ("While creating Bean " +
              e.getMessage ());
         } // catch
        } // ejbCreate
        public void ejbRemove () {}
        public void ejbActivate () {}
        public void ejbPassivate () {}
        public void setSessionContext (SessionContext ctx) {}
    } // SimpappBeancan any body suggest me where lies the problem???
    all my Home ,Remote classes are doing well when they are used for any other simple helloworld type of program

    Is that the only Oracle client installed? If you have another one hanging around it could be using the wrong tnsnames file.

  • How to create a cache for JPA Entities using an EJB

    Hello everybody! I have recently got started with JPA 2.0 (I use eclipseLink) and EJB 3.1 and have a problem to figure out how to best implement a cache for my JPA Entities using an EJB.
    In the following I try to describe my problem.. I know it is a bit verbose, but hope somebody will help me.. (I highlighted in bold the core of my problem, in case you want to first decide if you can/want help and in the case spend another couple of minutes to understand the domain)
    I have the following JPA Entities:
    @Entity Genre{
    private String name;
    @OneToMany(mappedBy = "genre", cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<Novel> novels;
    @Entity
    class Novel{
    @ManyToOne(cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Genre genre;
    private String titleUnique;
    @OneToMany(mappedBy="novel", cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<NovelEdition> editions;
    @Entity
    class NovelEdition{
    private String publisherNameUnique;
    private String year;
    @ManyToOne(optional=false, cascade={CascadeType.PERSIST, CascadeType.MERGE})
    private Novel novel;
    @ManyToOne(optional=false, cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Catalog appearsInCatalog;
    @Entity
    class Catalog{
    private String name;
    @OneToMany(mappedBy = "appearsInCatalog", cascade = {CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<NovelEdition> novelsInCatalog;
    The idea is to have several Novels, belonging each to a specific Genre, for which can exist more than an edition (different publisher, year, etc). For semplicity a NovelEdition can belong to just one Catalog, being such a Catalog represented by such a text file:
    FILE 1:
    Catalog: Name Of Catalog 1
    "Title of Novel 1", "Genre1 name","Publisher1 Name", 2009
    "Title of Novel 2", "Genre1 name","Pulisher2 Name", 2010
    FILE 2:
    Catalog: Name Of Catalog 2
    "Title of Novel 1", "Genre1 name","Publisher2 Name", 2011
    "Title of Novel 2", "Genre1 name","Pulisher1 Name", 2011
    Each entity has associated a Stateless EJB that acts as a DAO, using a Transaction Scoped EntityManager. For example:
    @Stateless
    public class NovelDAO extends AbstractDAO<Novel> {
    @PersistenceContext(unitName = "XXX")
    private EntityManager em;
    protected EntityManager getEntityManager() {
    return em;
    public NovelDAO() {
    super(Novel.class);
    //NovelDAO Specific methods
    I am interested at when the catalog files are parsed and the corresponding entities are built (I usually read a whole batch of Catalogs at a time).
    Being the parsing a String-driven procedure, I don't want to repeat actions like novelDAO.getByName("Title of Novel 1") so I would like to use a centralized cache for mappings of type String-Identifier->Entity object.
    Currently I use +3 Objects+:
    1) The file parser, which does something like:
    final CatalogBuilder catalogBuilder = //JNDI Lookup
    //for each file:
    String catalogName = parseCatalogName(file);
    catalogBuilder.setCatalogName(catalogName);
    //For each novel edition
    String title= parseNovelTitle();
    String genre= parseGenre();
    catalogBuilder.addNovelEdition(title, genre, publisher, year);
    //End foreach
    catalogBuilder.build();
    2) The CatalogBuilder is a Stateful EJB which uses the Cache and gets re-initialized every time a new Catalog file is parsed and gets "removed" after a catalog is persisted.
    @Stateful
    public class CatalogBuilder {
    @PersistenceContext(unitName = "XXX", type = PersistenceContextType.EXTENDED)
    private EntityManager em;
    @EJB
    private Cache cache;
    private Catalog catalog;
    @PostConstruct
    public void initialize() {
    catalog = new Catalog();
    catalog.setNovelsInCatalog(new ArrayList<NovelEdition>());
    public void addNovelEdition(String title, String genreStr, String publisher, String year){
    Genre genre = cache.findGenreCreateIfAbsent(genreStr);//##
    Novel novel = cache.findNovelCreateIfAbsent(title, genre);//##
    NovelEdition novEd = new NovelEdition();
    novEd.setNovel(novel);
    //novEd.set publisher year catalog
    catalog.getNovelsInCatalog().add();
    public void setCatalogName(String name) {
    catalog.setName(name);
    @Remove
    public void build(){
    em.merge(catalog);
    3) Finally, the problematic bean: Cache. For CatalogBuilder I used an EXTENDED persistence context (which I need as the Parser executes several succesive transactions) together with a Stateful EJB; but in this case I am not really sure what I need. In fact, the cache:
    Should stay in memory until the parser is finished with its job, but not longer (should not be a singleton) as the parsing is just a very particular activity which happens rarely.
    Should keep all of the entities in context, and should return managed entities form mehtods marked with ##, otherwise the attempt to persist the catalog should fail (duplicated INSERTs)..
    Should use the same persistence context as the CatalogBuilder.
    What I have now is :
    @Stateful
    public class Cache {
    @PersistenceContext(unitName = "XXX", type = PersistenceContextType.EXTENDED)
    private EntityManager em;
    @EJB
    private sessionbean.GenreDAO genreDAO;
    //DAOs for other cached entities
    Map<String, Genre> genreName2Object=new TreeMap<String, Genre>();
    @PostConstruct
    public void initialize(){
    for (Genre g: genreDAO.findAll()) {
    genreName2Object.put(g.getName(), em.merge(g));
    public Genre findGenreCreateIfAbsent(String genreName){
    if (genreName2Object.containsKey(genreName){
    return genreName2Object.get(genreName);
    Genre g = new Genre();
    g.setName();
    g.setNovels(new ArrayList<Novel>());
    genreDAO.persist(t);
    genreName2Object.put(t.getIdentifier(), em.merge(t));
    return t;
    But honestly I couldn't find a solution which satisfies these 3 points at the same time. For example, using another stateful bean with an extended persistence context (PC) would work for the 1st parsed file, but I have no idea what should happen from the 2nd file on.. Indeed, for the 1st file the PC will be created and propagated from CatalogBuilder to Cache, which will then use the same PC. But after build() returns, the PC of CatalogBuilder should (I guess) be removed and re-created during the succesive parsing, although the PC of Cache should stay "alive": shouldn't in this case an exception being thrown? Another problem is what to do when the Cache bean is passivated. Currently I get the exception:
    "passivateEJB(), Exception caught ->
    java.io.IOException: java.io.IOException
    at com.sun.ejb.base.io.IOUtils.serializeObject(IOUtils.java:101)
    at com.sun.ejb.containers.util.cache.LruSessionCache.saveStateToStore(LruSessionCache.java:501)"
    Hence, I have no Idea how to implement my cache.. Can you please tell me how would you solve the problem?
    Many thanks!
    Bye

    Hi Chris,
    thanks for your reply!
    I've tried to add the following into persistence.xml (although I've read that eclipseLink uses L2 cache by default..):
    <shared-cache-mode>ALL</shared-cache-mode>
    Then I replaced the Cache bean with a stateless bean which has methods like
    Genre findGenreCreateIfAbsent(String genreName){
    Genre genre = genreDAO.findByName(genreName);
    if (genre!=null){
    return genre;
    genre = //Build new genre object
    genreDAO.persist(genre);
    return genre;
    As far as I undestood, the shared cache should automatically store the genre and avoid querying the DB multiple times for the same genre, but unfortunately this is not the case: if I use a FINE logging level, I see really a lot of SELECT queries, which I didn't see with my "home made" Cache...
    I am really confused.. :(
    Thanks again for helping + bye

  • Porting EJB 3 MDB from OC4J to WLS

    Posting this again since my last post didn't seem to take.
    I get the following three deployment error messages when attempting to deploy an application to WebLogic Server 10.3 technical preview. The problem is centered around my deployment of an EJB 3 message driven bean.
    1. An error occurred during activation of changes, please see the log for details.
    2. Exception preparing module: EJBModule(EngineEjb.jar) Unable to deploy EJB: Requestor from EngineEjb.jar: [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment. weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'jms/demoQueue' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation. at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641) at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:246) at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1013) at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:907) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1211) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:387) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:381) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:517) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    3. Substituted for missing class [EJB - 11026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment. weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'jms/demoQueue' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation.
    My MDB uses an annotation like the following:
    @MessageDriven(mappedName = "jms/demoQueue", name = "MyMDB",
    activationConfig =
    @ActivationConfigProperty(propertyName = "destinationType",
    propertyValue = "javax.jms.Queue")
    @ActivationConfigProperty(propertyName = "messageSelector", propertyValue =
    "RECIPIENT = 'MyRecipient'")
    Earlier, I did create a JMS Module named demoQueue with the following resources:
    Name Type JNDI Name
    testQueue Queue jms/demoQueue
    ConnectionFactory-0 Connection Factory jms/QueueConnectionFactory
    Any suggestions to fix the WLS deployment error?
    For continuing compatibility with my OC4J deployment, I would like to continue using a connection factory with the following JNDI name "jms/QueueConnectionFactory" shown above.
    So I plan to add the following properties to the @MessageDriven annotation above. These are needed to continue working with our OC4J deployment. However, my primary concern is to get this MDB working with WLS. Does this strategy seem reasonable for allowing deployment to both OC4J and WLS?
    @ActivationConfigProperty(propertyName = "connectionFactoryJndiName",
    propertyValue =
    "jms/QueueConnectionFactory") ,
    @ActivationConfigProperty(propertyName = "destinationName", propertyValue =
    "jms/demoQueue")
    Thanks,
    Travis

    Travis, you pose a very good question. If I understand your goal, you would like to use code that compiles and works in OC4J and WLS. For example, you want to use javax.ejb.MessageDriven instead of weblogic.ejbgen.MessageDriven.
    Using something like mappedName as it is referred to here allows you specify the JNDI name in WLS if it is not defined elsewhere, but it appears to be specific to the WLS implementation.
    I've seen several other questions posed about finding all of the available ActivationConfigProperty name / value pairs and I have been unable to find it myself.
    I tried several permutations of annotations, and I can't figure out why something like this would even work, but it does. The mapped name is my JNDI name, but I never specify that it is a javax.jms.Queue or which connection factory to use. How does WLS figure that out?
    @MessageDriven(     
         mappedName = "exampleQueue", name = "HelloWorldMDB"
    public class HelloWorldMDB implements MessageListener {
         @Override
         @TransactionAttribute(value = javax.ejb.TransactionAttributeType.REQUIRED)
         public void onMessage(Message message) {
              System.out.println( "received message " + message );
    }This is a good question for support as the documentation seems to be incomplete here.

  • Using an EJB as a source for a Model

    Hi,
    Before starting with this post content it might be helpful to give you the desired output of what I am trying to do. Basically I need to have an HTML table that is populated from an EJB.
    The current proposed solution is as follows: the Model that is associated with a TiledView will be used as client for the EJB. The Model will make use of the methods in the EJB to get different java.util.Collection objects for different Helper classes based on the find criteria.
    For example, if the EJB represent a book and there is a home method to retrieve a list of books based of the book category. In this case the Model will act as a client of the EJB, retrieve the list of books and use the different methods in the Model, such as insert and retrieve, to get the list of books and to add a book up on request.
    I know that my post might not be clear. But as I said, all that is needed is to have a TiledView that displays books information, which are retrieved from an EJB, and allow a user to select a book to display its information.
    My suggested solution could be completely wrong, not visible and reflect a bad design. Please if any one went through such a situation give me a hint.
    Regards,
    Basil Mahdi

    Basil,
    This is some material I snipped from an internal Sun forum I posted to regarding a simple EJB Jato integration example.
    I hate to give just any EJB JATO example because frankly there are so many different use cases with EJBs that no one example will match up against your needs. You can use an EJB
    - in a Custom Model Operation you can encapsulate an EJB Method invocation
    - in a Custom Command you can encapsulate any arbitrary code include calling an EJB
    - as the backingstore for a CustomModel
    - use a BeanAdapterModel to adapt to the value/transfer beans which are uses as parameters or return values of EJB methods
    - use an ObjectAdapterModel to adapt an EJB directly by assigning the EJB reference in setObject() in the constructor of the OAM
    As you can see, an EJB is just another business object API...its just that you acquire the reference with a few lines of ugly JDNI and Home interface APIs.
    Nevertheless, here is some guidance. I would like to reinforce that there is no direct solution for adapting an EJB from BAM; EJBs are not JavaBeans. What is a solution is to have the parameters or return values of your EJBs use value/transfer object patterns in the form of JavaBeans. The BAM may be used to adapt to these parameters or return value of the EJB.
    In short, when using BAM in a tileview to work with an EJB, there is little difference than using BAM at any other time, you the developer, must manage/code the placement of the EJB parameters directly into the BAM or in a scoped attribute to be used by the BAM.
    In another example, you may have a SLSB which models an employee called EmployeeSupport. You may have a transfer object (JavaBean) of type EmployeeRecord. You may have operations on the EJB including:
    public EmployeeRecord findEmployee(String employeeID);
    public EmployeeRecord[] findEmployees(String location);
    public void updateEmployee(EmployeeRecord);
    One could create a BAM in the studio called EmployeeModel
    You would set the JavaBean class to EmployeeRecord
    You would run the Design Action to bootstrap the properties of EmployeeRecord as fields on the model
    Now you have a model which is ready to adapt to EmployeeRecord bean.
    Feel free to add material to the EmployeeModel to make a richer API; for instance you could encapsulate some EJB'ish code in their to act as a service locator for a EmployeeSupprt SLSB.
    protected static EmployeeSupport support;
    static {
    javax.naming.Context context = new javax.naming.InitialContext();
    Object objref = context.lookup("ejb/EmployeeSupport");
    EmployeeSupportHome home = (EmployeeSupportHome)
    javax.rmi.PortableRemoteObject.narrow(objref,EmployeeSupportHome .class);
    support = home.create();
    public static EmployeeSupport getEmployeeSupport() {
    return support;
    If you really wanted to hide the EJB'ishness of the EmployeeSupport you could even wrap the behavior and handle exceptions, etc.
    public static EmployeeRecord findEmployee(String employeeID) {
    return getEmployeeSupport().findEmployee(employeeID);
    public static EmployeeRecord[] findEmployees(String location) {
    return getEmployeeSupport().findEmployees(location);
    public static void updateEmployee(EmployeeRecord record) {
    return getEmployeeSupport().updateEmployee(record);
    You could even help the view developer latch EJB transfer objects into the model for adaption; saving them from the effort
    public void adaptEmployee(String employeeID) {
    setBean(findEmployee(employeeID));
    public void adaptLocation(String location) {
    setBean(findEmployees(location));
    public void save() {
    updateEmployee((EmployeeRecord)getBean());
    Create a search ViewBean, place a text field on it for an EmployeeID and button labeled Find. Leave the EmployeeID model binding default (to use a DefaultModel memory model). Open the handle request event method on the viewbean for the Find button.
    public void handleFindRequest....{
    EmployeeModel model = .....;
    model.adaptEmployee(getEmployeeIDChild().getValue());
    // display Edit page which has fields for editing the employee record
    Create an edit ViewBean, with editable fields bound to the EmployeeModel; add an button labeled update
    public void handleUdpateRequest....{
    EmployeeModel model = .....;
    model.save();
    // do whatever is next ....
    Notice that the we are jumping across request boundaries in this example. Using just default model reference configurations, the EmployeeModel will be created brand new during the Update request and there will be no bean currently adapted. Most likely, you would want to have the model (and hence its adapted bean) stored in HttpSession across at least these related requests. In this case the model reference used by the search ViewBean would have "store in session" true. and the model reference in the edit ViewBean would have "look in session" true.
    What we recommend is that someone who understands the business tier design take the responsibility to create a set of "business delegates" as JATO models. An advanced technique would be to encapsulate these models in a component library JAR which multiple web applications can reuse. As you can imagine, there are so many ways to do the same thing. You could just as easily make a CustomModel or SimpleCustomModel to adapt to your EJB. You can also, if your EJB uses primitives or JavaBeans (or graphs of JavaBeans) for all parameters, use the ObjectAdapterModel to directly connect to an EJB.

  • Locate another EJB in 8.1.7 db

    I created a couple session EJB's and deployed them to an Oracle 8i db. I can call both of them from a client, but I can't figure out how to use one ejb from the other. One bean has this code but it doen't work:
    Context ic = new InitialContext( );
    Client cl = (Client) ic.lookup("Client");
    I just can't figure hot to reference another ejb. The "caller" ejb has a refernce in the deployment descriptor like:
    <ejb-ref>
    <description></description>
    <ejb-ref-name>Client</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>ClientHome</home>
    <remote>Client</remote>
    <ejb-link>/com/nsc/docworks/Client</ejb-link>
    </ejb-ref>
    Any help is appreciated, thanks.

    I figured it out, too simple.
    Context ic = new InitialContext ( );
    // get the home
    ClientHome clh = (ClientHome)ic.lookup ("/test/Client");
    // get the remote interface
    Client cl = clh.create();
    cl.setClientId(333);
    cl.remove();
    null

  • Problem when using JPA/EJB in webservice

    I wrote a web service that use JPA/EJB to connect to Sybase (the existing tables), and deployed to OC4J, but it got the following error when the web service is invoked:
    <env:Envelope
      xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns0="http://prjtestws_9/types/">
     <env:Body>
      <env:Fault>
       <faultcode>env:Server</faultcode>
       <faultstring>Internal Server Error (Caught exception while handling request: java.lang.NullPointerException)</faultstring>
      </env:Fault>
     </env:Body>
    </env:Envelope>
    I have checked that, the query will return some records, and also it works fine if the program executed as a stand alone application.
    Thanks in advance

    I find that I can only have ONE webservice that using JPA/EJB for an OC4J instance, if more than one then the above error will come out, and I have to restart the OC4J instance to run another webservice that using JPA/EJB.
    Is there any solution for this issue?
    Thanks

  • How do I reference an EJB inside anothe EJB ,both are on different hosts

    Hi,
    I want to reference an EJB on one host inside another EJB in another
    host. Even if i hardcode the url of the host on which the EJB is
    deployed , it gives me the error regarding the no such ejb found.
    I would appreciate your help.
    Thanks

    Robert,
    We've been trying to implement this type of multi-server setup for some
    time now. Our application consists of 260+ EJBs with a large team of
    developers actively working against it. The business logic in our
    application puts the EJBS in a highly interrelated situation. This
    degree of interrelation makes it necessary for each developer to deploy
    the entire application before any work can get done.
    Starting a weblogic server, on a Windows Workstation, with 260+ beans is
    very time consuming. But to get around this development bottle neck, we
    are attempting the same scenario described in this thread. We have
    recently upgraded from WL4.5.x to WL5.1 SP8. With WL5.1, we get the
    CommunicationException seen previously in this thread. But the Error
    message in WL5.1 is less descriptive. The 5.1 error message is missing:
    WL6.0 Error Text: "This error could indicate that a component was
    deployed on a cluster member but not other members of that cluster. Make
    sure that any component deployed on a server that is part of a cluster
    is also deployed on all other members"
    It is obvious that weblogic's clustering depends on classes being
    available to each server in the cluster, including the ejbc generated
    _WLStub classes.  To me, it seems wrong that a weblogic server can only
    use standard JNDI to lookup HomeInterfaces on other weblogic servers if
    the hidden _WLStub classes are available to both servers.  I say this
    because non-weblogic clients have JNDI lookup abilities without these
    requirements. This whole experience was frustrating because all along
    I knew that the solution was simply to take the hacker route and put the
    classes in the the client classpath. I guess I just want to know if
    this is bug? If not, I think it should be.
    Thanks for listening
    Steve Dodge
    Steve Dodge
    Realeum Inc.
    Robert Patrick wrote:
    Here is an example:
    On server1, I have a Bean called TellerBean that calls the AccountBean
    that lives on server2. To make this work, I need to deploy the
    TellerBean.jar file AND any/all AccountBean Stub classes (any file in the
    deployed version of the AccountBean.jar file matching the pattern
    AccountBean*Stub.class) on server1. Server2 only needs to deploy the
    AccountBean.jar file
    Hope this helps,
    Robert
    kamps wrote:
    Thanks.
    I did include the files using import and they are alsso packaged
    into the jar file .
    I have done this , TradeCheck is the ejb i am trying to reference
    in Trader EJB.
    I package them into the jar file as follows:-
    @REM Compile EJB classes into the build directory (jar preparation)
    javac -d build TradeCheck.java TradeCheckHome.java Trader.java
    TraderHome.java TraderBean.java TradeResult.java
    @REM Make a EJB jar file, including XML deployment descriptors
    cd build
    jar cv0f std_ejb20_basic_statelessSession2.jar META-INF examples
    images
    cd ..
    @REM Run EJBC on jar file
    java -classpath
    %WL_HOME%/lib/weblogic_sp.jar;%WL_HOME%/lib/weblogic.jar weblogic.ejbc
    -compiler javac build\std_ejb20_basic_statelessSession2.jar
    %APPLICATIONS%\ejb20_basic_statelessSession2.jar
    It still gives the same error not finding the stub class.... Could
    you kindly elaborate on what needs to be done.
    I would appreciate your help.
    Thanks,
    Sunitha
    Robert Patrick <[email protected]> wrote:
    The problem is that the client that downloads the stubs
    at runtime cannot
    be another WebLogic Server. We do not support downloading
    classes into a
    running server so you will need to make sure that the
    stubs are
    "available" to the server that is acting as a client (e.g.,
    packaged in
    the EAR file) on the server acting as a client.
    kamps wrote:
    Thanks Mahendra. I am using WebLogic 6.0. Should I importthe package
    in the first ejb which references the 2nd ejb or evenin the client
    which references the first ejb.
    Thanks again,
    Sunitha
    "Mahendra Dhamdhere" <[email protected]> wrote:
    You are not getting the reference of stub.
    try this. In your client program, import the package
    in
    which ejb classes
    are present. As client downloads the stub from weblogic,
    you have to import
    the package where your stubs are present.
    which version of weblogic are you using?
    Mahendra
    kamps <[email protected]> wrote in message
    news:[email protected]...
    Thanks,
    I have 2 ejbs: one is TraderBean and a client RefClient.
    TraderBean in turn calls a method of another bean
    TradeCheckBean.
    I tried making the changes as suggested but I amgetting
    the following
    error on the client side.
    java examples.ejb20.basic.tatelessSession.RefClient"t3://localhost:7001"
    javax.naming.CommunicationException. Root exceptionis
    java.rmi.UnmarshalException:
    failed to unmarshal class java.lang.Object; nested
    exception
    is:
    java.lang.ClassNotFoundException:examples.ejb20.basic.statelessSession.Trade
    CheckBeanHomeImpl_WLStub: This error could indicatethat a component
    was deployed on
    a cluster member but not other members of that
    cluster.
    Make
    sure that any componen
    t deployed on a server that is part of a cluster
    is
    also deployed
    on all other member
    s of that cluster
    java.lang.ClassNotFoundException:examples.ejb20.basic.statelessSession.TradeCheckBea
    nHomeImpl_WLStub: This error could indicate that
    a
    component was
    deployed on a clus
    ter member but not other members of that cluster.
    Make
    sure that
    any component deploy
    ed on a server that is part of a cluster is also
    deployed
    on all
    other members of tha
    t cluster
    <<no stack trace available>>
    I would appreciate any help.
    Thanks,
    kamps
    "Mahendra Dhamdhere" <[email protected]> wrote:
    you need to get initialcontext of that server.
    Context ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
    try
    ctx = new InitialContext(ht); // Use
    the
    context
    in your program
    } catch (NamingException e)
    {    // a failure occurred  }
    finally {    try {ctx.close();}
    catch (Exception e)
    {      // a failure occurred    } }
    use url of that other server. After getting initialcontext,
    lookup for your
    ejb.
    Mahendra
    kampu S <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I want to reference an EJB on one host inside
    another
    EJB in another
    host. Even if i hardcode the url of the host on
    which
    the EJB is
    deployed , it gives me the error regarding the
    no
    such
    ejb found.
    I would appreciate your help.
    Thanks

  • EJB lookup from another EJB server

    Hi people,
    I have two application servers on two different computers. One
    of them contains an EJB, which I need to access from another EJB
    server. I know that I can achieve this using RMI, but will then
    security and transaction contexts be propagated to the called
    EJB?
    Sincerely,
    Sergei Batiuk.

    Here is the solution posted on another forum:
    [email protected] Dec 8, 6:03 am show options
    Newsgroups: ibm.software.websphere.studio
    From: [email protected]
    Date: 8 Dec 2004 06:03:04 -0800
    Local: Wed, Dec 8 2004 6:03 am
    Subject: Re: EJB lookup on from one server to another does not work
    Eric,
    I dealt with this same problem trying to run 2 local servers (websphere
    test servers), using 2 separate WSAD 5.1.2 workspaces. Running on 1
    server I have an application that contains an EJB, and running on the
    other server is an application that uses an access bean to make a
    remote call to my EJB, running on my other server. I too repeately
    received the "NameNotFoundException" when trying to lookup my EJB home
    reference.
    What you have to do to get around this is to modify the server
    configuration of the application that contains the EJB that you are
    attempting to call remotely. You must open the the server.wsi file for
    the server that is running the EJB and go to the "Configuration" tab.
    You must check the "Enable administrative console". Once this is
    complete, start your server. When it is started, right click on the
    server, and select "run administrative console". In the admin console,
    select
    servers -> application servers -> <your server> -> end points ->
    bootstrap address. For "host" you must change "localhost" to either
    your ip address or computer name (ive only tried my ip, but your
    computer name should work too). When building your properties to get
    the initial context, make sure you use
    "env.put(Context.PROVIDER_URL, "corbaloc:iiop:<the ip or computer name
    listed as the bootstrap host of server running ejb>:<the port listed as
    the bootstrap port of server running ejb, which is 2809 in your case>
    Restart your server and things should work.

  • Error in calling an EJB from another EJB

    Hello All,
    I have a scenario where i need to call a method of an ejb from another ejb.
    Both the EJB's are in different DC's.
    EG: DC1 using DC2
    I have added the public part of DC2 in DC1.
    The following code is written in DC1 to access the EJB of DC2
          MyRemote l_remote;
           MyHome l_home;
           InitialContext l_ctx = new InitialContext();
    >>       l_home = (MyHome)l_ctx.lookup("JNDI Name");
           l_remote = (MyRemote)l_home.create();
    There is no error at build time and deploy time, but at run time "MyHome" class is not found.
    Even i am not able to access the helper class defined in the DC2 at runtime.
    Please help.
    Thanks in Advance

    First off, wrong forum section.
    Check if your JNDI name is correctly placed for the bean you're calling -- check j2ee-engine.xml for that. Check the EJB container if the ear file you deployed is there and updated.
    Try placing  "localejbs/JNDI name" on your lookup parameter.
    Regards,
    Jan

  • Error when One EJB calls anothe EJB

    Hi,
    I got the following error when I use one EJB call another EJB in OAS 4.0.8.1, the code is developed in JDeveloper 3.0/Win NT 4.0/SP5.
    Can anyone give me some ideas? or is there any samples in this case?
    Thanks a lot!
    Creating an initial context
    Looking for the EJB published as 'APP/APPEJB'
    Creating a new EJB instance
    Calling APPEJB methods...
    CORBA: org.omg.CORBA.BAD_OPERATION: ; nested exception is:
    org.omg.CORBA.BAD_OPERATION:
    java.rmi.ServerException: CORBA: org.omg.CORBA.BAD_OPERATION: ; nested exception is:
    org.omg.CORBA.BAD_OPERATION:
    at javax.rmi.oas.corba.CorbaRemoteExceptionHelperValue.OBVObjFrom(Compiled Code)
    at TwoEJB._stub_APPEJB.callEJBMapping(Compiled Code)
    at TwoEJB.TwoEJBClient.main(Compiled Code)
    null

    Home handle is an object that identifies an enterprise bean. A client may serialize the handle, and then later deserialize it to obtain a reference to the enterprise bean.
    The javax.ejb.HomeHandle is similar to javax.ejb.Handle. Just as the Handle is used to store and retrieve reference to EJB objects, the HomeHandle is used to store and retrieve remote references to EJB homes. HomeHandle can be stored and later used to access an EJB home remote refrence the same way that a Handle can be serialized and later used to access an EJB object's remoe reference.
    import java.io.*;
    import javax.ejb.EJBHome;
    import javax.ejb.HomeHandle;
    public class WorkingWithEJBHandles {
    public static void main( String[] args ) throws Exception {
    EJBHome aHome = null;
    // get hold of a home interface
    HomeHandle handle = aHome.getHomeHandle();
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream( bos );
    oos.writeObject( handle );
    byte[] handleAsBytes = bos.toByteArray();
    // store in the database, on file. howwever you want
    FileInputStream fis = new FileInputStream( "fileobj" );
    ObjectInputStream ois = new ObjectInputStream( fis );
    HomeHandle theHandle = (HomeHandle) ois.readObject();
    // get back the EJBHome from the HomeHandle
    aHome = theHandle.getEJBHome();
    // the same kind of logic also holds for EJBHandles, as well as
    // HomeHandles
    Transfer Object is a Design pattern. Refer to Core J2EE Design Pattern.
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html
    Rgds,
    Seetesh

  • Could i use another database

    Im wondering if i can use another database for the workflow engine. I mean it comes with a database managment by default i want to know if a can use another one (SQL server)

    Hi,
    We have been using jtds driver , which is free and the fastest and without any bugs until now, we have been using it for 4 months now.
    The part below explain how to set up your mssql server with jtds driver.
    create a db lets call is bpel
    then run these queries on it. basically to create the tables, these files are
    domain_sqlserver.ddl
    server_sqlserver.ddl
    workflow_sqlserver.sql
    sensor_sqlserver.sql
    located at
    /OraBPELPM_1/integration/orabpel/system/database/scripts
    After that download the jtds driver for sql server.
    We do not use the microsofts jdbc driver for mssql, although we have tried it.
    It doesnt work properly, with the bpel process manager, basically it has some problem with select image and blob types from DB.
    Anyways, the best one we found was for jtds, it works great and is the fastest I beleive.
    We used data direct's jdbc driver but its not free and after doing some benchmark tests we found jtds was the fastest.
    mkdir -p jdbc/jTDS/unzip
    cd jdbc/jTDS/unzip
    download the jtds-1.2-dist.zip from
    wget http://surfnet.dl.sourceforge.net/sourceforge/jtds/jtds-1.2-dist.zip
    unzip jtds-1.2-dist.zip
    cd unzip
    cp jtds-1.2.jar OraHome_1/integration/orabpel/system/appserver/oc4j/j2ee/home/applib/
    You will now have to configure MsSQL in your data-sources.xml file.
    Microsoft SQL Server Database Configuration
    Oracle Bpel now needs to be configured to use Microsoft SQL Server, using the JDBC drivers.
    cd OraHome_1/integration/orabpel/system/appserver/oc4j/j2ee/home/config/
    vi data-sources.xml
    You must then place the following xml within the file:
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="BPELServerDataSource"
    location="jdbc/BPELServerDataSourceWorkflow"
    xa-location="BPELServerDataSource"
    ejb-location="jdbc/BPELServerDataSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="BPEL_user"
    password="bpeluser!">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="AdminConsoleDateSource"
    location="jdbc/AdminConsoleDateSource"
    xa-location="AdminConsoleDateSource"
    ejb-location="jdbc/AdminConsoleDateSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="user_name"
    password="password">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="BPELSamplesDataSource"
    location="jdbc/BPELSamplesDataSource"
    xa-location="BPELSamplesDataSource"
    ejb-location="jdbc/BPELSamplesDataSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="user_name"
    password="password">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    Run the BPEL server and everything should work fine.

Maybe you are looking for

  • Questions on ICR reconciliation process 002 (process behaviour)

    Dear all, I am implementing ICR reconciliation process 002   and I have some questions regarding process's behaviour and functionality. I have set u201CDefine Rules for Document Assignments" as following: 1     POPER     Posting period     = Equal   

  • Configure a POP3 account for sending mail only

    Right heres my problem; I have an inbox.com account (POP3 Only) and a Google Mail account (IMAP) which I only use to sync my calender. I use my inbox.com account for all my mail as its a more formal address but google mail has the IMAP feature which

  • Maximising 2 programs using dual screen on mac mini.

    I am using a mac mini with 2 screens and am trying to use it like my pc. I want to maximise a program on one screen and keep the second screen free to do the same. This works well on pc but not with my mini? When I mazimise one program it creates a g

  • Miro-want to debit a material without using a purchase order reference

    Hi, I have activated direct posting to material account but when make MIRO, the system generates the accounting document on GL account not material account and dont update the material stock. Where to configure to make posting on material account. Re

  • [Solved] MSi GT60 Dominator (non-3K) - RAM Slots

    Anyone knows where the primary RAM slot is located ? I'm want to replace the stock 8G Kingston RAM with a 16G Corsair Vengence which i already own. I can only see 2 empty slots when i open the bottom lid.