Dynamic queries in weblogic

In case of dynamic queries, I found out that the finder method can not be defined
in the Home class. I defined the finder
method in the Bean.
In my Bean, this is the code:
public Collection findAllActivities(String filter, Object[] arguments) throws
FinderException
     Properties myProp = new Properties();
     for(int i = 0; i < arguments.length; i++)
          myProp.setProperty(String.valueOf(i), String.valueOf((arguments)));
     try
          InitialContext ic = new InitialContext();                
          RolesHome rh = (RolesHome)ic.lookup("RolesHome");     
          QueryHome qh = (QueryHome)rh;
          String weblogicQL = "SELECT DISTINCT OBJECT(o) FROM roles AS o" + filter;
          Query query = qh.createQuery();
          return query.find(weblogicQL, myProp);
     catch (Exception e)
          e.printStackTrace();
          return null;
I get a naming exception if I use :      RolesHome rh = (RolesHome)ic.lookup("RolesHome");
javax.naming.NameNotFoundException: Unable to resolve 'RolesHome' Resolved: ''
Unresolved:'RolesHome' ; remaining name
'RolesHome'
I get a casting exception if I use:      RolesHome rh = (RolesHome)ic.lookup("Roles");
In my jsp file:
I have this code
InitialContext jndiContext = new InitialContext();
Object obj = jndiContext.lookup("Roles");
RolesHome rolesHome = (RolesHome) obj;
list = (ArrayList) rolesHome.findAllActivities(filter, filterParams);          
but the problem is that the home interface does not contain the findAllActivities
function. I have already defined rolesHome
earlier in the code which I want to use for findAllActivities also. I can not
cast the bean e.g. RolesBean rolesBean = (
RolesBean) rolesHome. I do not want to create a new bean as I am already using
an old rolesHome. How do I solve this
problem??? Please do let me know. I am really confused.
Thanks
Ronak Parekh

This should be posted to the ejb newsgroups
mbg
"ronak" <[email protected]> wrote in message
news:3e57faa9$[email protected]..
>
In case of dynamic queries, I found out that the finder method can not bedefined
in the Home class. I defined the finder
method in the Bean.
In my Bean, this is the code:
public Collection findAllActivities(String filter, Object[] arguments)throws
FinderException
Properties myProp = new Properties();
for(int i = 0; i < arguments.length; i++)
myProp.setProperty(String.valueOf(i), String.valueOf((arguments)));
try
InitialContext ic = new InitialContext();
RolesHome rh = (RolesHome)ic.lookup("RolesHome");
QueryHome qh = (QueryHome)rh;
String weblogicQL = "SELECT DISTINCT OBJECT(o) FROM roles AS o" + filter;
Query query = qh.createQuery();
return query.find(weblogicQL, myProp);
catch (Exception e)
e.printStackTrace();
return null;
I get a naming exception if I use : RolesHome rh =
(RolesHome)ic.lookup("RolesHome");
>
javax.naming.NameNotFoundException: Unable to resolve 'RolesHome'Resolved: ''
Unresolved:'RolesHome' ; remaining name
'RolesHome'
I get a casting exception if I use: RolesHome rh =(RolesHome)ic.lookup("Roles");
>
>
In my jsp file:
I have this code
InitialContext jndiContext = new InitialContext();
Object obj = jndiContext.lookup("Roles");
RolesHome rolesHome = (RolesHome) obj;
list = (ArrayList) rolesHome.findAllActivities(filter, filterParams);
but the problem is that the home interface does not contain thefindAllActivities
function. I have already defined rolesHome
earlier in the code which I want to use for findAllActivities also. I cannot
cast the bean e.g. RolesBean rolesBean = (
RolesBean) rolesHome. I do not want to create a new bean as I am alreadyusing
an old rolesHome. How do I solve this
problem??? Please do let me know. I am really confused.
Thanks
Ronak Parekh

Similar Messages

  • Using "enable-dynamic-queries"

    Has any one used <enable-dynamic-queries>True</enable-dynamic-queries> in weblogic-ejb-jar.xml?
    If yes, where exactly do you specify that? As per the DTD, you do it in "<entity-descriptor>"
    element. I tried that but I can't deploy the application on wls 7.
    Any ideas what might be wrong?
    Also, does anyone know if I WLS 7 supports using WL extensions to EJB-QL for writing
    dynamic queries?
    Thanks for the help.

    Here's the relevant section of my weblogic-ejb-jar.xml
    <weblogic-enterprise-bean>
    <ejb-name>ABC</ejb-name>
    <entity-descriptor>
    <entity-cache>
    <concurrency-strategy>Exclusive</concurrency-strategy>
    </entity-cache>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <db-is-shared>false</db-is-shared>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    <enable-dynamic-queries>True</enable-dynamic-queries>
    </entity-descriptor>
    <local-jndi-name>ABC</local-jndi-name>
    </weblogic-enterprise-bean>
    Here's the stack trace for the error.
    ####<Jun 6, 2002 12:11:39 PM EDT> <Info> <HTTP> <MKDW> <myserver> <main> <kernel
    identity> <> <101202> <_appsdir_exploded_dir:web preparing>
    ####<Jun 6, 2002 12:11:40 PM EDT> <Error> <Deployer> <MKDW> <myserver> <main> <kernel
    identity> <> <149205> <The Slave Deployer failed to initialize the application appsdirexploded_dir
    due to error weblogic.management.ApplicationException: Prepare failed. Task Id =
    null
    Module Name: ejb, Error: The XML parser encountered an error in your deployment descriptor.
    Please ensure that your deployment descriptor corresponds to the format in the DTD.
    The error was:
    org.xml.sax.SAXParseException: Element type "enable-dynamic-queries" must be declared.
         at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1273)
         at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1889)
         at weblogic.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3714)
         at weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1242)
         at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1186)
         at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:396)
         at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:1119)
         at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:133)
         at weblogic.ejb20.dd.xml.WebLogicEjbJarLoader_WLS600.process(WebLogicEjbJarLoader_WLS600.java:469)
         at weblogic.ejb20.dd.xml.DDUtils.processXML(DDUtils.java:252)
         at weblogic.ejb20.dd.xml.DDUtils.processXML(DDUtils.java:216)
         at weblogic.ejb20.dd.xml.DDUtils.processWLEjbJarXML(DDUtils.java:202)
         at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:100)
         at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:85)
         at weblogic.ejb20.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:491)
         at weblogic.ejb20.deployer.EJBModule.loadDescriptor(EJBModule.java:213)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:628)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:548)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:437)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplications(SlaveDeployer.java:478)
         at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeployer.java:252)
         at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initialize(DeploymentManagerServerLifeCycleImpl.java:150)
         at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.java:54)
         at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:762)
         at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
         at weblogic.Server.main(Server.java:31)
    --------------- nested within: ------------------
    weblogic.xml.process.XMLParsingException: Element type "enable-dynamic-queries" must
    be declared. - with nested exception:
    [org.xml.sax.SAXParseException: Element type "enable-dynamic-queries" must be declared.]
    File: META-INF/weblogic-ejb-jar.xml Line: 211 Column: 37
         at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:137)
         at weblogic.ejb20.dd.xml.WebLogicEjbJarLoader_WLS600.process(WebLogicEjbJarLoader_WLS600.java:469)
         at weblogic.ejb20.dd.xml.DDUtils.processXML(DDUtils.java:252)
         at weblogic.ejb20.dd.xml.DDUtils.processXML(DDUtils.java:216)
         at weblogic.ejb20.dd.xml.DDUtils.processWLEjbJarXML(DDUtils.java:202)
         at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:100)
         at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:85)
         at weblogic.ejb20.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:491)
         at weblogic.ejb20.deployer.EJBModule.loadDescriptor(EJBModule.java:213)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:628)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:548)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:437)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplications(SlaveDeployer.java:478)
         at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeployer.java:252)
         at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initialize(DeploymentManagerServerLifeCycleImpl.java:150)
         at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.java:54)
         at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:762)
         at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
         at weblogic.Server.main(Server.java:31)
    }.>

  • Dynamic query in weblogic 7.0?

    Hi:
    I tried dynamic query in weblogic 7.0 for almost a month but still failed. So I wish someone can help me .
    I used dynamic query in a session bean.
    QueryHome queryHome = (QueryHome) ctx.lookup("java:comp/env/ejb/BooksEJB");
    But this line always returns null for queryHome. I am sure my JNDI for CMP 2.0 BooksEJB is right.
    I also set <enable-dynamic-queries>True</enable-dynamic-queries>
    in descriptor file followed by instructions in bea documentation.
    Thanks !

    Ace:
    Shall I set this parameter in weblogic descriptor file ? If so, how do I set
    ? Thanks for your information here !
    [email protected] (Ace) wrote:
    The parameter for ctx.lookup() is what you have set the JNDI name for
    QueryHome in weblogic.
    ~Ace.
    Cottonxu <[email protected]> wrote in message news:<[email protected]>...
    Hi:
    I tried dynamic query in weblogic 7.0 for almost a month but stillfailed. So I wish someone can help me .
    I used dynamic query in a session bean.
    QueryHome queryHome = (QueryHome) ctx.lookup("java:comp/env/ejb/BooksEJB");
    But this line always returns null for queryHome. I am sure my JNDIfor CMP 2.0 BooksEJB is right.
    I also set <enable-dynamic-queries>True</enable-dynamic-queries>
    in descriptor file followed by instructions in bea documentation.
    Thanks !

  • How to enable dynamic query in weblogic 7.0?

     

    Hi,
    The documentation explains how to enable dynamic queries and set a
    method-permission to control access. If you find the information at the
    following link insufficient, let me know.
    http://e-docs.bea.com/wls/docs70/ejb/cmp.html#1089703
    You enable dynamic queries in your weblogic-ejb-jar.xml file with the following:
    <enable-dynamic-queries>True</enable-dynamic-queries>
    You can set a method permission as follows:
    <security-role>
    <role-name>Admin</role-name>
    </security-role>
    <method-permission>
    <role-name> Admin </role-name>
    <method>
    <ejb-name> EmployeeEJB </ejb-name>
    <method-name> createQuery </method-name>
    </method>
    </method-permission>
    - Matt
    Sanjeev Chopra wrote:
    also posting to EJB newsgroup
    "CottonXu" <[email protected]> wrote in message
    news:[email protected]..
    How to enable dynamic query in weblogic 7.0? The documentation accompanieswith
    Bea doesn't explain it in detail. How to set <method-permission> inejb-jar.xml?
    Thanks in advance.

  • Enabling dynamic queries in wl7

    How do I enable dynamic queries in WL7. The info provide here is not very clear...like how/what to change in ejb-jar.xml http://e-docs.bea.com/wls/docs70/ejb/cmp.html#1089703

    Hi Minh,
    This is the second time I've answered this question in a week. I'll make sure the documentation gets clarified.
    You enable dynamic queries in your weblogic-ejb-jar.xml file with the following:
    <enable-dynamic-queries>True</enable-dynamic-queries>
    You can optionally set a method permission in ejb-jar.xml to control access to the feature. An example follows:
    <security-role>
    <role-name>Admin</role-name>
    </security-role>
    <method-permission>
    <role-name> Admin </role-name>
    <method>
    <ejb-name> EmployeeEJB </ejb-name>
    <method-name> createQuery </method-name>
    </method>
    </method-permission>
    - Matt
    Minh Cao wrote:
    How do I enable dynamic queries in WL7. The info provide here is not very clear...like how/what to change in ejb-jar.xml http://e-docs.bea.com/wls/docs70/ejb/cmp.html#1089703

  • Dates and dynamic queries

    Hi.
    I am retrieving Entity EJBs using dynamic queries.
    I had some troubles working with dates.
    This is an example about the kind of query I am talking about:
    SELECT OBJECT(a) FROM Payment AS a WHERE a.date <= '2/3/2005'
    It worked prefectly fine in development environment.
    So far so good, but finally it did not work properly in production.
    I think the reason is that date format configuration is different (after all, all other queries without any date parameter works fine).
    How can I set date format for Weblogic Server 8.1?
    Or maybe some other idea about what is going on?
    Thanks in advance
    Oscar

    I'd use a java.sql.PreparedStatement and let it worry about properly escaping that Date. I'd also be leery of returning a ResultSet. That's a database cursor, a scarce resource. Better to load the result of your query into a data structure and close the ResultSet right away.
    String sql = "SELECT * FROM purchasedTransaction "
                      + "WHERE "
                      + "transactionDate >= ? AND transactionDate <= ?";
    PreparedStatement statement = connection.prepareStatement(sql);
    statement.setDate(1, theDateFrom);
    statement.setDate(2, theDateTo);
    ResultSet result = statement.executeQuery();
    while (result.next())
    // load your query into a data structure of some kind and return that.
    result.close();
    statement.close();Returning a CachedRowSet would be better than a ResultSet:
    http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html
    MOD

  • Invoking a web service from dynamic client in weblogic 7

    Is it possible to invoke a webservice from dynamic client in weblogic 7. Because i tried and it doesn't work. But it works with WL 8.1
    I don't see any samples on the net for weblogic 7.

    Hello rss,
    If you want to invoke a web service from a JCD you will have to build the SOAP message using JAX-RPC or AXIS and then programmatically creat an HTTP connection.
    Or you can leverage the HTTP(S) eWay and then you only have to build the SOAP message.
    Or use eInsight. You can import a WSDL into eInsight and eInsight will offer you a business process Activity to invoke the web service operations defined in the WSDL.

  • Dynamic client in weblogic 9

    I have created a dynamic client to invoke a Web Service that uses non-built-in data types as parameter and return type in weblogic8.1 using ant task autotype and JAX-RPC. Now we are moving toward weblogic 9.0 but i could find equivalent way of creating dynamic client. So how can we create dynamic client in weblogic 9.0? I would also like to mention that our clients are standalone client. Thanks in advance for your help.

    Thanks for your response.My requirement is, if we change interface means return object or parameters then we don't want to do redeployment of client jar. we want if there is any changes to the interface then it should be taken automatically.

  • Queries about weblogic server

    hi,
    can someone please provide answers for following queries
    Does Weblogic has something called ?Administration Mode? and if answer is yes does it also report web logic service as ?not running?.
    can we take Weblogic backup and if answer is yes what do we backup?
    When can we say that web logic is unstable?
    thanks
    ajay

    ajay prabhu <> wrote:
    hi,
    can someone please provide answers for following queries
    Does Weblogic has something called ?Administration Mode? and if answer is
    yes does it also report web logic service as ?not running?. Euh... via the administration server you can see if an
    application/server/etc is running or not.
    can we take
    Weblogic backup and if answer is yes what do we backup? The config directory + the application itself are important
    When can we say
    that web logic is unstable?If it crashes :)
    Schelstraete Bart
    http://www.schelstraete.org
    Linkedin: http://www.linkedin.com/in/bschelst

  • Data series / dynamic queries

    Hi,
    I've got the following problem:
    I want to create a stacked bar chart based on dynamic queries. The query I use for the first series is:
    select null link, kw label, sum (volume) value from testview
    where id = to_number(:P18_ID)
    group by kw
    order by kw
    P18_ID is an input field.
    The query works fine and the chart is also ok.
    But if I use this same query for a second series I get an empty svg canvas as result. Even worse: no matter what kind of query I use for the second series I never get a result unless I take the variable P18_ID away from the first query.
    For info: the view testview is based on a table created by a pl/sql function (using pipelined output).
    Any ideas. I really would appreciate a quick answer very much because this is part of a project and we are running out of time because of this error.
    Thanks.

    Hi Andy,
    first of all: thank you very much for your efforts.
    I've tried something like you said before and yes, it works (at least most of the times). The problem is I want to have the option 'show all'. That's why I can't use a' where' clause (because I can't work with 'like ...%' for it would sometimes give wrong results because of ids with the same prefix -> or am I wrong?)
    What I mean is:
    where id like '1'% -> results for item 1 (and 10,11,12,...)
    where id like ' '% -> results for all items
    That's why I want to use a pl/sql function. The function is tested and works fine. But if I try to call it form ApEx it works only if use constants instead of variables or if I have only one series.
    Is there something like a time limit? Like ApEx stops processing if the database isn't answering as fast as expected (because a function is slower than querying a table). I don't really think that could be the answer because it's very little data and I'm using a pipelined function... but perhaps...

  • Dynamic Queries with JSP

    I am developing a search page which should first bring the results sorted by some particular field & then the user should have the option of sorting the results by other field names which are provided in a form list.
    For generating dynamic requests, ? is used in place of parameter. But for some reason it is not working with Order by. Other dynamic queries are working fine. Please let me know the right way to handle it.
    And also if someone can advise a good reference book for dynamic SQL statements in accordance with JSP.
    Thanks for your time.

    Never mind my previous solution. Some success was not perfect, therefore not acceptable. I used a scriplet and the problem is solved!
      <!-- Dynamically build the query -->
        <%
          String sql = "select * from issue_list_view";
          String where = null;
          String param = null;
          // Status
          param = (String)pageContext.getAttribute("status");
          if(param != null && param.compareTo("")!=0)
            where = "status='"+param+"'";
          else
            where = "status not in ('Closed','Duplicate')";
          // Assigned To
          param = (String)pageContext.getAttribute("assign");
          if(param != null && param.compareTo("")!=0)
            if(where.length()>0) {where += " and ";}
            where = "category='"+param+"'";
          // Category
          param = (String)pageContext.getAttribute("category");
          if(param != null && param.compareTo("")!=0)
            if(where.length()>0) {where += " and ";}
            where = "category='"+param+"'";
          // Type
          param = (String)pageContext.getAttribute("type");
          if(param != null && param.compareTo("")!=0)
            if(where.length()>0) {where += " and ";}
            where += "issue_type='"+param+"'";
          // Id
          param = (String)pageContext.getAttribute("id");
          if(param != null && param.compareTo("")!=0)
            if(where.length()>0) {where += " and ";}
            where += "issue_id="+param;
          // Add where clause if needed
          if(where != null) { sql += " where " + where; }
        %>
        <!-- Do the query -->
        <sql:query var="issues" sql="<%=sql%>"/>

  • Dynamic queries best practice

    Hello,
    I want to create a report that the user can use radio buttons to refine. As an example, referring to the apex sample application's Products page, add radio buttons for [>] All prices [>] under $500.
    I think the technique demonstrated for building dynamic query reports (this is a 1.6 tutorial,link to it is here) is the way to do this, but I'm not sure this is the best approach.
    I'm wondering about any design disadvantage. I'd appreciate comment. Also, if there is a working example with source view in the public apex workspaces you are aware of, post a link if there's value beyond the tutorial I mentioned.
    Thank you.
    Albert

    I am using dynamic queries from time to time. Here is a working example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    You may have a look.
    Denes Kubicek

  • How to escape apostrophe in Oracle PL/SQL  dynamic queries

    I have an script that receives an string as a parameter, for example:
    @C:/myScript.sql "AXEL";
    @C:/myScript.sql "AXEL DAVID";
    @C:/myScript.sql "o'neal";
    my scripts basically constructs a Parameterized query an execute it. That's all. It works most of the time, except when the parameter contains apostrophes
    DEFINE myparameter = &&1
    myquery := "Select * from myTable where x = :p1";
    EXECUTE IMMEDIATE myquery into results USING myparameter;
    ...When trying the following;
    @C:/myScript.sql "o'neal";
    I get the following error:
    Bind Variable "p1" is NOT DECLARED
    Of course if I change the parameter as "o''neal" It will work, but I will end up with other issues later on, so I would like to know how can I deal with apostrophe on dynamic queries.
    I also tried to use the following:
       myquery := "Select ....  where x = " || Q'#:p1#';
    ...but not working.
    any hint will be appreciated =)
    Edited by: user13679988 on Nov 22, 2012 3:12 PM
    Edited by: user13679988 on Nov 22, 2012 3:38 PM
    Edited by: user13679988 on Nov 22, 2012 3:45 PM

    DUPLICATE THREAD! and WRONG FORUM!
    This forum is for SQL Developer questions only and your question has nothing to do with sql developer. Please mark this question ANSWERED.
    You have already posted this question in the SQL and PL/SQL forum and should continue to use that thread.
    How to replace 2 single quotes to single quote

  • Dynamic queries

    I am trying to use "? parameter style" to execute dynamic queries at runtime on the view object. I was sucessful in using this for the rowsetInfo but i want to do this for a view object. I cant seem to call the new queries after i assign the new where clause to the VO using the whereClauseParams(). I am building an applet/application. Does anyone have any examples....( ie : oracle people)?

    I looked at the help-topics under creating and changing view object queries in the code....however how do i tie this into the view objects i already created using BC4J...Here is my code for example:
    ApplicationModule appmod = sessionInfo1.getApplicationModule();
    ViewObject vo = appmod.findViewObject("PARAMVIEW");
    vo.setWhereClause("MGR > 1000");
    vo.executeQuery();
    rowSetInfo1.executeQuery();
    ---this does not work!!!!
    this does however
    rowSetInfo1.setWhereClause("MGR > 1000");
    rowSetInfo1.executeQuery();
    i want to use the vo because i was told that the rowSetInfo.executeQuery runs on the client side (in Help- 'ABOUT Dynamic Clauses in Data Form'-->"...the addition of dynamic WHERE and ORDER BY clauses that execute on the data form *client*")while the vo.executeQuery on the server side...Does anyone know if this is true...and if this will improve performances in an applet or am i just waisting my time?
    thanks

  • Create dynamic Topics in WebLogic 12c?

    I am new to both JMS and WebLogic, and I can't seem to figure out how to properly run my JMS solution in WebLogic. I have developed my proof-of-concept with Active MQ, but the application will eventually need to run on WebLogic.
    Active MQ allowed me to create Topics dynamically, by simply calling createTopic() on TopicSession. If the Topic doesn't exist, it is created, which is exactly what I need. I can't figure out an easy way to do this in WebLogic. I know that createTopic() won't work as per the documentation:
       Note: The createQueue() and createTopic() methods do not create destinations dynamically; they create only references to destinations that already exist.
       For information about creating destinations dynamically, see Chapter 7, "Using JMS Module Helper to Manage Applications."
    I am aware that there is a `JMSModuleHelper` class, but the javadoc says the following:
       Note: Oracle recommends that the use of the create (distributed)queue/topic methods be strictly limited, as they directly modify the associated
       JMS Module configuration (your-jms.xml) file and provide minimal feedback for detecting success or failure.
    In addition to this warning, the usage of this class involves complex manipulation of MBeans and requires the knowledge of which server my application is running on. This is very inconvenient, since my app will be deployed to multiple servers based on the desired environment (ie. Integration Test, System Test, UAT, Prod, etc).
    Is there really no easy way to use dynamic Destinations in WebLogic?
    This makes me wonder if my entire JMS based design might be misguided... The idea is that I have 5 different applications, but these applications share a large user base among themselves. These users have consistent IDs among the applications. Some events within any of the applications trigger a JMS message that is broadcast to a Topic with a name derived from the currently logged in USER_ID. Every time a user logs into any of the apps, the app subscribes to that USER_ID_Topic, with the application name being the Subscription ID. This way the message is broadcast to all users when they log in to any of the 5 applications, yet there is a well defined, centralized Topic for all applications to push their user events into.
    Is there a way to do this in WebLogic, or is this a bad approach?
    Any advice would be appreciated!
    Val

    I think what your question boils down to is whether you can call Session.createTopic(topicName) to create new topics on-the-fly. The JMS specification doesn't require this to be possible, but many vendors including Glassfish Message Queue do allow this.
    If your JMS provider doesn't allow dynamically-created topics you can achieve the same effect by using a standard topic name and then a message selector to "filter" the topic. A message selector allows the consumer to specify that they want to receive only those messages which match some specified condition based on a message property.
    Nigel

Maybe you are looking for

  • Error while creating a catalog in launchpad

    Dear All, While creating catalog in launchpad, I am getting below error. Details of the error are as below:- Can you please help me out. (My system environment, Netweaver Gateway SP07, UI SP08). Best Regards, Atul Jain

  • Wireless keyboard not connecting to iPad?

    New wireless keyboard not connecting to iPad.

  • Importing class packages

    i am currently developing a flash movie with no graphics at the moment. It is being done with a lot of classes and packages, many of the AS classes import the same packages as well. I have many linked movie clips to those classes. The problem is that

  • Month subscription to Italy

    Question:If I pay one month subscription 400 min  for landlines and mobiles in Italy what happens if the person (who has that italian mobile phone I wish to call ) travel for some time to UK ?  Can I  still  call that italian mobile phone number for 

  • European Style Date Converter - mm/dd/yyyy to dd.mm.yy

    Hi, I am trying to write a program that reads a string for a date in the format mm/dd/yyyy and display it in the typical European format of dd.mm.yy For example if the input is 03/13/2004 I'd like the output to appear as 13.03.04. Also I'd like it to