Cocoa Binding: Connecting ObjectController

I've been trying to figure out how Cocoa Binding is supposed to work. The developer documents aren't Apple's best so I've been trying to learn by example. I've built my first demo following this article:
http://www.cocoadevcentral.com/articles/000080.php
I'm trying to understand the significance of assigning the "content" outlet of an object controller. In the demo there's a nested set of data objects and thus a nested set of binding controllers or what might call a binding source in .NET. The only binding controller that has its "content" outlet connected is the object controller. The others are connected via the bindings inspector. What is the reason for this seemingly inconsistent behavior? Why am I not assiging the content outlet for other binding controllers?
Another area I'm having trouble with is the concept of controller selections. I don't see how a table view for example communicates its selection to the array controller. I see how an object/array controller is bound using KVB however it doesn't seem obvious how an object/array controller's selection is set.
Finally, the concept of having multiple controllers for your view tends to go against the grain. How do you integrate Cocoa Binding controllers with your view's controller? In the article referenced above the controller is treated like a model. Is it better practice to connect your model to your object/array controller in code from your view's controller? I really wish that Cocoa Binding controllers were called something other than controllers because it causes great confusion. Any help would be greatly appreciated.

I've been trying to figure out how Cocoa Binding is supposed to work. The developer documents aren't Apple's best so I've been trying to learn by example. I've built my first demo following this article:
http://www.cocoadevcentral.com/articles/000080.php
I'm trying to understand the significance of assigning the "content" outlet of an object controller. In the demo there's a nested set of data objects and thus a nested set of binding controllers or what might call a binding source in .NET. The only binding controller that has its "content" outlet connected is the object controller. The others are connected via the bindings inspector. What is the reason for this seemingly inconsistent behavior? Why am I not assiging the content outlet for other binding controllers?
Another area I'm having trouble with is the concept of controller selections. I don't see how a table view for example communicates its selection to the array controller. I see how an object/array controller is bound using KVB however it doesn't seem obvious how an object/array controller's selection is set.
Finally, the concept of having multiple controllers for your view tends to go against the grain. How do you integrate Cocoa Binding controllers with your view's controller? In the article referenced above the controller is treated like a model. Is it better practice to connect your model to your object/array controller in code from your view's controller? I really wish that Cocoa Binding controllers were called something other than controllers because it causes great confusion. Any help would be greatly appreciated.

Similar Messages

  • Use of Bind , Connect with IP Multicasting

    i'm trying to get a clear picture of the semantics of using bind, connect with IP multicasting.
    ipv4 & ipv6 both are relavent.
    it is my understanding -- you must multicast join on each interface you want to receive on.
    in my view of the world, ideal semantics would provide :
    bind-ing a socket to a specific local IP address, port - that has joined multiple IP multicast addresses
    on multiple interfaces would allow multicasts to still be received - but would limit them to
    interfaces which matched the bound IP address, and further if more than 1 interface supported
    the same IP address, would allow receipt for all the joined interfaces that match the bound
    IP address.
    this does not appear to be the case; it appears that binding to a local IP address causes
    multicast receipt to terminate. binding to 1 of the joined multicast address limits receipt
    to the bound multicast address. the semantics seem confusing.
    regarding connect :,
    imagine multiple sources of a specific IP multicast address; your socket is doing receiving only,
    no transmiting. it seems that ideally connect would allow you to limit the receipt of IP multicast
    to the source that you connect to; i imagine connecting to the foreign IP address,
    not the IP multicast address being transmitted. if semantically i could connect to the IP multicast address
    i would still be receiving from all the sources - so no filtering benefit.
    my understanding is you can connect to a IP multicast address; but this seems redundant to bind with
    the only advandage that you can use send instead of sendto. and further if multiple sources are
    transmitting the same IP multicast address you dont get filtering
    when i tried using multiple sources transmitting 2048 different IP multicast address, with a receiver
    who had multicast joined the same 2048 IP multicast address -- as soon as connect to 1 of the
    sources ( foreign IP address) of the IP multicasts i stop receving packets all together. i had hoped
    to limit the receipt of the multicasts to just that single source.

    Generally, you would use bind variables by changing statements that are written like this
    select * from emp where empno=6678 and ename='Jones'
    so that they're written like
    select * from emp where empno=? and ename=?
    How you then bind these question marks to the particular values you want depends on the API you're using (ADO? OLE DB directly?, etc). If you have a support contract, there are plenty of examples for any API on metalink.oracle.com
    Justin

  • Bug: DatagramChannel bind/connect local address

    What are the chances of getting bug 6431343 fixed in JRockit?
    Basically, I need to be able to send a message from a specific local UDP port, and I also need to know the local address that the message will originate from.
    So when I bind using
    channel.socket().bind(new InetSocketAddress(9999));
    and then connect to the remote address
    channel.connect(new InetSocketAddress("localhost", 0));
    Then DatagramChannel should report the local address that any messages will originate from when I call
    channel2.socket().getLocalSocketAddress();
    but it instead seems to return a cached copy of the wildcard address as the local address.
    However, the behavior IS correct in a plain DatagramSocket.
    Here's a link to the bug:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6431343
    Thanks very much for your attention.

    As you have assumed, we use Sun's networking code and therefore inherit their bugs. All bugs that Sun fix are fixed in the JRockit version with the same JDK level (i.e. Sun 5.0u8 -> JR 5.0u8).
    However, if you have a support contract with BEA (for JRockit, WebLogic etc) then you can open a ticket with BEA Support. The issue will be investigated, and if it is critical and no good workaround can be found then you will be provided with a patch.
    -- Henrik

  • Core Data and Cocoa Binding

    Hello,
    I'm trying to make core data application and I refer to following url as test.
    http://developer.apple.com/cocoa/coredatatutorial/index.html
    However, I have following error.
    2011-03-04 00:32:01.476 XMLTest2CoreData[9954:a0f] An uncaught exception was raised
    2011-03-04 00:32:01.479 XMLTest2CoreData[9954:a0f] Cannot create BOOL from object (
    ) of class __NSArray0
    2011-03-04 00:32:01.481 XMLTest2CoreData[9954:a0f] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot create BOOL from object (
    ) of class __NSArray0'
    * Call stack at first throw:
    0 CoreFoundation 0x00007fff87de97b4 __exceptionPreprocess + 180
    1 libobjc.A.dylib 0x00007fff852cd0f3 objcexceptionthrow + 45
    2 CoreFoundation 0x00007fff87de95d7 +[NSException raise:format:arguments:] + 103
    3 AppKit 0x00007fff84830e78 _NSBoolFromValue + 443
    4 AppKit 0x00007fff848309a9 -[NSEditableBinder _setStatesImmediatelyInObject:mode:triggerRedisplay:] + 554
    5 AppKit 0x00007fff84830778 -[NSEditableBinder _observeValueForKeyPath:ofObject:context:] + 116
    6 AppKit 0x00007fff84775a33 -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 557
    7 AppKit 0x00007fff84752546 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1172
    8 AppKit 0x00007fff8475088d loadNib + 226
    9 AppKit 0x00007fff8474fd9a +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 248
    10 AppKit 0x00007fff8474fbd2 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 326
    11 AppKit 0x00007fff8474d153 NSApplicationMain + 279
    12 XMLTest2CoreData 0x0000000100001089 main + 33
    13 XMLTest2CoreData 0x0000000100001060 start + 52
    terminate called after throwing an instance of 'NSException'
    Entity is only one "Title" and it has one attribute "name".
    My XCode is version 3.2.5.
    Please give me advice...
    Thank you.

    I have a new problem...
    I succeed to run the application, and save the data.
    But cannot open the saved data.
    In addition, The application doesn't ask anything as terminating it.
    I checked that I could save the data.
    </metadata>
    </databaseInfo>
    <object type="GENE" id="z102">
    <attribute name="name" type="string">PTEN</attribute>
    <attribute name="creationdate" type="date">321113984.72053700685501098633</attribute>
    <relationship name="mrna" type="1/1" destination="M_RNA"></relationship>
    <relationship name="protein" type="1/1" destination="PROTEIN"></relationship>
    <relationship name="title" type="1/1" destination="TITLE"></relationship>
    </object>
    <object type="TITLE" id="z103">
    <attribute name="name" type="string">PTEN</attribute>
    <relationship name="genelist" type="0/0" destination="GENE" idrefs="z102"></relationship>
    </object>
    </database>
    And I tried to check the log...
    but, I have only following message...
    2011-03-06 23:56:15.660 XMLTest2CoreData[14116:a0f] Application terminating.
    - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
    NSLog(@"Application terminating.");
    if (!managedObjectContext) {
    NSLog(@"managedObjectContext is nil...");
    return NSTerminateNow;
    if (![managedObjectContext commitEditing]) {
    NSLog(@"%@:%s unable to commit editing to terminate", [self class], _cmd);
    return NSTerminateCancel;
    if (![managedObjectContext hasChanges]) {
    NSLog(@"Application has not changed.");
    return NSTerminateNow;
    NSError *error = nil;
    if (![managedObjectContext save:&error]) {
    NSLog(@"Application terminating and attempting to save.");
    // This error handling simply presents error information in a panel with an
    // "Ok" button, which does not include any attempt at error recovery (meaning,
    // attempting to fix the error.) As a result, this implementation will
    // present the information to the user and then follow up with a panel asking
    // if the user wishes to "Quit Anyway", without saving the changes.
    Any advice would be helpful.
    Thank you.
    Message was edited by: Rascal3

  • Bind connection limit

    Hey, im using bind9, and trying to figure out how to change connection limit, i suppose im going to do it via the bind ACL, but hell i cant find anywhere the option statement which limits max number of queries per some time, could anyone help me? thanks in advance

    > 1- How can i close open connections?
    > 2- Is it possible to close open connection automatically?
    Both of them should be handled by the application.
    > com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: com.sap.dbtech.jdbc.exceptions.JDBCDriverException: Cannot connect to jdbc:sapdb://unwsrv/EPP [Task limit].
    you can increase MaxUserTasks.
    Markus

  • Not able to Bind DPS 6.3.1

    Hey,
    I configured Sun Directory Server 6.3.1 on Solaris Sparc. I'm not able to bind the ldapclient.
    **DPS Error log says:**
    17/Sep/2009:07:36:08 +0000] - BACKEND - WARN - No data source available for ADD,BIND,COMPARE,DELETE,MODIFY, in data source pool cn=my pool,cn=datasource pools,cn=config .You may want to check whether the configuration of this pool contains at least one data source enabled and with non-zero weights.
    [17/Sep/2009:07:36:08 +0000] - BACKEND - WARN - Can't retrieve LDAP schema (LDAP error code: 32) No data view were found to process the search request.
    [17/Sep/2009:07:36:08 +0000] - STARTUP - INFO - Sun-Java(tm)-System-Directory-Proxy-Server/6.3 B2008.0311.0334 started on host server-ldap in directory /opt/ldap/master/att-dps1
    [17/Sep/2009:07:36:08 +0000] - STARTUP - INFO - Listening for secure client connections on 0.0.0.0:5392
    [17/Sep/2009:07:36:08 +0000] - STARTUP - INFO - Listening for client connections on 0.0.0.0:5391
    [17/Sep/2009:07:36:37 +0000] - BACKEND - WARN - LDAP server server-ldap:3998/ is up and running.
    [17/Sep/2009:07:36:37 +0000] - BACKEND - WARN - Attempt to bind as dc=my-domain,dc=com to backend server server-ldap:5389/ failed. Silent BIND failed : err=48, error message "",
    [17/Sep/2009:07:36:37 +0000] - BACKEND - ERROR - Failed to create a connection to mdtnj001ldap:5389/
    [17/Sep/2009:07:36:37 +0000] - BACKEND - WARN - LDAP server mdtnj001ldap:5389/ is up and running.
    [17/Sep/2009:11:39:53 +0000] - BACKEND - WARN - No servers available to process BIND in data source pool cn=defaultdatasourcepool,cn=datasource pools,cn=config
    DPS Acces logs says:*_
    [17/Sep/2009:08:56:45 +0000] - SERVER_OP - INFO - conn=67 op=1 BIND RESPONSE err=0 msg="" s_conn=dscc_ldap_mdtnj001ldap:3998:32
    [17/Sep/2009:08:56:45 +0000] - PROFILE - INFO - conn=67 assigned to connection handler cn=directory services administrators,cn=connection handlers,cn=config
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=67 op=1 BIND RESPONSE err=0 msg="" etime=0
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=67 op=2 UNBIND
    [17/Sep/2009:08:56:45 +0000] - DISCONNECT - INFO - conn=67 reason="unbind"
    [17/Sep/2009:08:56:45 +0000] - CONNECT - INFO - conn=68 client=135.25.219.143:28428 server=mdtnj001ldap:5391 protocol=LDAP
    [17/Sep/2009:08:56:45 +0000] - PROFILE - INFO - conn=68 assigned to connection handler cn=default connection handler, cn=connection handlers, cn=config
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=68 op=0 EXTENDED oid="1.3.6.1.4.1.1466.20037"
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=68 op=0 EXTENDED RESPONSE err=0 msg="" etime=0
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=68 op=1 BIND dn="cn=admin,cn=administrators,cn=dscc" method="SIMPLE" version=3
    [17/Sep/2009:08:56:45 +0000] - SERVER_OP - INFO - conn=68 op=1 BIND dn="cn=admin,cn=Administrators,cn=dscc" method="SIMPLE"" version=3 s_msgid=4 s_conn=dscc_ldap_mdtnj001ldap:3998:33
    *DS Error logs says:*
    [15/Sep/2009:09:35:59 +0000] - Sun-Java(tm)-System-Directory/6.3 B2008.0311.0058 (64-bit) starting up
    [15/Sep/2009:09:36:00 +0000] - Listening on all interfaces port 5389 for LDAP requests
    [15/Sep/2009:09:36:00 +0000] - Listening on all interfaces port 5390 for LDAPS requests
    [15/Sep/2009:09:36:00 +0000] - slapd started.
    [15/Sep/2009:09:36:00 +0000] - INFO: 161 entries in the directory database.
    [15/Sep/2009:09:36:00 +0000] - INFO: add:0, modify:0, modrdn:0, search:1, delete:0, compare:0, bind:0 since startup.
    [16/Sep/2009:09:36:00 +0000] - INFO: 161 entries in the directory database.
    [16/Sep/2009:09:36:00 +0000] - INFO: add:0, modify:2, modrdn:0, search:7348, delete:0, compare:0, bind:4 since startup.
    **DS Access logs says:**
    [17/Sep/2009:09:06:52 +0000] conn=630 op=44 msgId=45 - SRCH base="" scope=0 filter="(objectClass=1.1)" attrs=ALL
    [17/Sep/2009:09:06:52 +0000] conn=630 op=44 msgId=45 - RESULT err=0 tag=101 nentries=0 etime=0
    [17/Sep/2009:09:07:22 +0000] conn=637 op=180 msgId=1 - SRCH base="" scope=0 filter="(|(objectClass=*)(objectClass=ldapSubEntry))" attrs="1.1"
    [17/Sep/2009:09:07:22 +0000] conn=637 op=180 msgId=1 - RESULT err=0 tag=101 nentries=1 etime=0
    **On Ldap Client which is also Sun Sparc Box:**
    bash-3.00# ldapclient list
    NS_LDAP_FILE_VERSION= 2.0
    NS_LDAP_BINDDN= cn=proxyagent,ou=profile,dc=my-doamin,dc=com
    NS_LDAP_BINDPASSWD= {NS1}25c94587c053424f
    NS_LDAP_SERVERS= Y.Y.Y.Y:5389
    NS_LDAP_SEARCH_BASEDN= dc=my-domain,dc=com
    NS_LDAP_AUTH= simple
    NS_LDAP_SEARCH_REF= FALSE
    NS_LDAP_CACHETTL= 0
    NS_LDAP_CREDENTIAL_LEVEL= proxy
    bash-3.00# ldaplist -v
    +++ database=NULL
    +++ filter=objectclass=*
    +++ template for merging SSD filter=%s
    ldaplist: Object not found (Session error no available conn.
    I'm able to run successfully ldapsearch -p 5389 -h Y.Y.Y.Y -D "cn=Directory Manager" -b 'ou=People,dc=my-domain,dc=com' objectclass=* from client box [ When I'm using port 5389 where DS service is running on]
    BUT
    Getting Error when searching using port 5391 [Where DPS is running on ]
    bash-3.00# ldapsearch -p 5391 -h Y.Y.Y.Y -D "cn=Directory Manager" -b 'ou=People,dc=my-doamin,dc=com' objectclass=*
    Enter bind password:
    ldap_simple_bind: Operations error
    ldap_simple_bind: additional info: Unable to retrieve a backend BIND connection
    bash-3.00#
    bash-3.00# tail -f /var/ldap/cachemgr.log
    Tue Sep 15 09:06:38.0240 Starting ldap_cachemgr, logfile /var/ldap/cachemgr.log
    Tue Sep 15 09:06:38.0460 sig_ok_to_exit(): parent exiting...
    Tue Sep 15 09:31:25.3718 Starting ldap_cachemgr, logfile /var/ldap/cachemgr.log
    Tue Sep 15 09:31:25.3977 sig_ok_to_exit(): parent exiting...
    bash-3.00# tail -f /var/adm/messages
    Sep 17 03:44:41 mdtnj001wbs last message repeated 11 times
    Sep 17 03:44:41 mdtnj001wbs last message repeated 11 times
    Sep 17 03:48:31 mdtnj001wbs ldaplist[6828]: [ID 293258 user.error] libsldap: Status: 32 Mesg: openConnection: simple bind failed - No such object
    Sep 17 03:48:31 mdtnj001wbs ldaplist[6828]: [ID 293258 user.error] libsldap: Status: 32 Mesg: openConnection: simple bind failed - No such object
    Could you please help me out. Whats wrong configuration I made .. OR Did I forget to add....
    Thanks
    Sanjay

    Adding Few more Info for the same:
    I create My View/My Pool
    bash-3.00# /opt/ldap/master/dps6/bin/dpconf get-ldap-data-view-prop -h server-ldap -p 5391 -v My\ View
    alternate-search-base-dn : ""
    alternate-search-base-dn : dc=com
    attr-name-mappings : none
    base-dn : dc=my-doamin,dc=com
    contains-shared-entries : false
    custom-distribution-algorithm : none
    description : -
    distribution-algorithm : none
    dn-join-rule : none
    dn-mapping-attrs : none
    dn-mapping-source-base-dn : none
    excluded-subtrees : -
    filter-join-rule : none
    is-enabled : true
    is-read-only : false
    is-routable : true
    ldap-data-source-pool : My Pool
    lexicographic-attrs : all
    lexicographic-lower-bound : none
    lexicographic-upper-bound : none
    non-viewable-attr : none
    non-writable-attr : none
    numeric-attrs : all
    numeric-default-data-view : false
    numeric-lower-bound : none
    numeric-upper-bound : none
    pattern-matching-base-object-search-filter : all
    pattern-matching-dn-regular-expression : all
    pattern-matching-one-level-search-filter : all
    pattern-matching-subtree-search-filter : all
    process-bind : -
    replication-role : master
    viewable-attr : all except non-viewable-attr
    writable-attr : all except non-writable-attr
    The "get-ldap-data-view-prop" operation succeeded on "server-ldap:5391".
    bash-3.00# /opt/ldap/master/dps6/bin/dpconf list-attached-ldap-data-sources -h server-ldap -p 5391 -v My\ Pool
    SRC_NAME add-weight bind-weight compare-weight delete-weight modify-dn-weight modify-weight search-weight
    My DS disabled disabled disabled disabled disabled disabled 100
    The "list-attached-ldap-data-sources" operation succeeded on "server-ldap:5391".
    bash-3.00# /opt/ldap/master/dps6/bin/dpconf list-ldap-data-sources -v -h server-ldap -p 5391
    SRC_NAME is-enabled ldap-address ldap-port ldaps-port description
    My DS true server-ldap 5389 ldaps
    dscc_ldap_server-ldap:3998 true server-ldap 3998 ldaps dscc administration server
    The "list-ldap-data-sources" operation succeeded on "mdtnj001ldap:5391".
    If you need more info .. please let me know....
    Thanks
    Sanjay

  • MS Access connection pool

    Hello, I'm using MS Access (it's all I have 'Access' to) to test my EJB application and I can connect to it with the following code:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    String url = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=C:/projs/p1/Users.mdb";
    Connection c = DriverManager.getConnection(url);
    But I must somehow create a DataSource to this database so my app server (SUN app server 7) can create a connection pool to it. PLS HELP!! I have tried for the past 2 days but couldn't get the right parameters to make a DataSource connection!
    (there's a limitation with MS Access in that 1 computer can only have 10 open connections to Access at a time, which is why I need to implement a connection pool)

    try this code, assume that i have database on drive G: named "soal.mdb". You have to download the package "com.sun.jndi.fscontext.RefFSContextFactory" from this site ( http://java.sun.com ) on JNDI sections.... 100% works !!
    import javax.naming.*;
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import javax.sql.*;
    public class CobaJNDI2 {
         static final String BIND = "pool4";
         public static void main( String[] args ) throws SQLException {
              sun.jdbc.odbc.ee.ConnectionPoolDataSource cpds = new sun.jdbc.odbc.ee.ConnectionPoolDataSource( BIND );
              Hashtable env = new Hashtable( 11 );
              env.put( Context.INITIAL_CONTEXT_FACTORY,
                   "com.sun.jndi.fscontext.RefFSContextFactory" );
              env.put( Context.PROVIDER_URL,
         "file:/" );
    cpds.setMinPoolSize( "1" );
    cpds.setInitialPoolSize( "1" );
    cpds.setMaxPoolSize( "2" );
    cpds.setMaxIdleTime( "1" );
    cpds.setTimeoutFromPool( "1" );
    cpds.setMaintenanceInterval( "1" );
    cpds.setDatabaseName( "DRIVER=Microsoft Access Driver (*.mdb);DBQ=g:\\soal.mdb" );
    //cpds.setDatabaseName( "hoho" );
              try {
                   Context c = new InitialContext( env );
                   c.rebind( BIND, cpds );
                   c.close();
                   InitialContext ic = new InitialContext( env );
                   ConnectionPoolDataSource ds = ( ConnectionPoolDataSource )ic.lookup( BIND );
                   Connection conn = ds.getPooledConnection().getConnection();
                   Statement stmt = conn.createStatement();
                   ResultSet rs = stmt.executeQuery( "select * from trsewa" );
                   while( rs.next() )
                        System.out.println( rs.getString( 1 ) );
                   //NamingEnumeration ne = ic.list( "" );
                   //while( ne.hasMore() ) {
                   //     System.out.println( ne.next() );
                   while( true ) { }
                   //System.exit( 0 );
              catch( NamingException ne ) {
                   ne.printStackTrace();
    }

  • Cannot bind when using "pwdLastSet" attribute in Active Directory

    Admin resets the password & enables user has to change password at next logon, when i try to change user password, I couldn't able to bind the user & it shows error Such as
    Since Authentication fails, he could able to modify the attribute[pwdLastSet].
    please suggest me any solution
    Error occured
    xyz is not authenticated javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 773, vece
    javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C090A1A, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece
    Since i couldn't able to bind the user, i cann;t able to change user password. Here is my program :
    {code}public class Fastbindclient_changePwd extends HttpServlet{
    class ldapfastbind {
    class FastBindConnectionControl implements Control {
    public byte[] getEncodedValue() {
    return null;
    public String getID() {
    return "2.16.840.1.113730.3.4.2";
    public boolean isCritical() {
    return Control.CRITICAL;
    public ldapfastbind(String ldapurl) {
    env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PROTOCOL, "ssl");
    env.put(Context.PROVIDER_URL, ldapurl);
    connCtls = new Control[] { new FastBindConnectionControl() };
    try {
    ctx = new InitialLdapContext(env,connCtls);
    catch (NamingException e) {
    public int Authenticate(String username, String password, HttpServletRequest request, HttpServletResponse response) throws LDAPException{
    try {
    ctx.addToEnvironment(Context.SECURITY_PRINCIPAL,username);
    ctx.addToEnvironment(Context.SECURITY_CREDENTIALS,password);
    ctx.reconnect(connCtls);
    System.out.println(username + " is authenticated");
    return 0;
    catch (AuthenticationException e) {
    int index5= errMsg.indexOf("data 773");
    if(index5 != -1)
    try {
    pwdLastSet = 1;
    System.out.println("Password Last Set "+pwdLastSet);
    String j_username=request.getParameter("j_username");
    String j_password=request.getParameter("j_password");
    String new_password=request.getParameter("new_password");
    String change_password=request.getParameter("change_password");
    boolean isChanged = ctxFast.ChangePassword(j_username, j_password, new_password, request, response);
    } catch (IOException e1) {
    catch (NamingException e) {
    return 0;
    public boolean ChangePassword(String sUserName, String sOldPassword, String sNewPassword, HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException {
    try {
    ModificationItem[] mods = new ModificationItem[1];
    ModificationItem[] mods1 = new ModificationItem[1];
    String oldQuotedPassword = "\"" + sOldPassword + "\"";
    byte[] oldUnicodePassword = oldQuotedPassword.getBytes("UTF-16LE");
    String newQuotedPassword = "\"" + sNewPassword + "\"";
    byte[] newUnicodePassword = newQuotedPassword.getBytes("UTF-16LE");
    System.out.println("newUnicodePassword" + newUnicodePassword);
    System.out.println("printed before modify");
    mods[0] = new ModificationItem(LdapContext.REPLACE_ATTRIBUTE, new BasicAttribute("unicodePwd", newUnicodePassword));
    ctx.modifyAttributes("cn="+sUserName+",cn=Users,dc=tc,dc=com", mods);
    mods1[0] = new ModificationItem(LdapContext.REPLACE_ATTRIBUTE, new BasicAttribute("pwdLastSet", "-1"));
    System.out.println("pwdLastSet Replaced");
    /* mods[0] = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("unicodePwd", oldUnicodePassword));
    mods[1] = new ModificationItem(DirContext.ADD_ATTRIBUTE, new BasicAttribute("unicodePwd", newUnicodePassword));
    ctx.modifyAttributes("cn="+sUserName+",cn=Users,dc=tc,dc=com", mods1);
    ctx.close();
    return true;
    catch (AuthenticationException e) {
    if(index5 != -1)
    try {
    pwdLastSet = 1;
    System.out.println("Password Last Set "+pwdLastSet);
    String j_username=request.getParameter("j_username");
    String j_password=request.getParameter("j_password");
    String new_password=request.getParameter("new_password");
    String change_password=request.getParameter("change_password");
    boolean isChanged = ctxFast.ChangePassword(j_username, j_password, new_password, request, response);
    } catch (IOException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    return false;
    catch (NamingException e) {
    return false;
    public void finito() {
    try {
    ctx.close();
    System.out.println("Context is closed");
    catch (NamingException e) {
    System.out.println("Context close failure " + e);
    public void bindClient(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    String ldapurl = "ldaps://172.22.0.99:636";
    String keystore = "D:/j2sdk1.4.2_04/jre/lib/security/CACert.ks";
    System.setProperty("javax.net.ssl.trustStore",keystore);
    ctxFast = new ldapfastbind(ldapurl);
    try {
    IsAuthenticated = ctxFast.Authenticate(request.getParameter("j_username"),request.getParameter("j_password"), request, response);
    boolean isChangedNrml;
    if(pwdLastSet == 0)
    isChangedNrml = ctxFast.ChangePassword(j_username, j_password, new_password, request, response);
    System.out.println("b4 change");
    System.out.println("After change 1");
    } catch (LDAPException e) {
    System.out.println("LDAP Exception : " + e.getLDAPResultCode() + "LDAPMessage : " + e.getLDAPErrorMessage()+ "message : " + e.getMessage());
    e.printStackTrace();
    String errMsg = e.getMessage();
    System.out.println("error msa"+errMsg);
    ctxFast.finito();
    public ldapfastbind ctxFast = null;
    public int pwdLastSet = 0;
    }please suggest me solution
    Thanks in Advance..

    See my other reply concerning "user must change password" and the chicken & egg problem.
    In addition when using the LDAP Fast Bind control, it is only used to authenticate a user (verify credentials).
    If the user has the "user must change password" setting enabled, then the LDAP Fast Bind Connection Control will always fail the authentication attempt.
    Furthermore, the LDAP Fast Bind control does not create a Windows token, and even of the user had successfully authenticated, it does not permit the user to perform other operations againts the directory such as modify attribute values or change passwords.
    You must perform a full LDAP bind in order to allow a user to change their password or to modify other attribute values.

  • DPS11g: [Original error=52] Unable to retrieve backend SEARCH connection

    Directory Proxy 11g
    We get, on a random basis the following two errors....
    Err1: SEARCH RESPONSE err=52 msg="Unable to process the search request. Reason: [Original error=52] Unable to retrieve a backend SEARCH connection."
    Err2: [Original error=52] Unable to retrieve a backend BIND connection
    The following sun blog suggested increasing max connection setting from 1024 or change the connectionPoolTimeoutInMillisec under cn=config.
    http://blogs.sun.com/sin/entry/unable_to_retrieve_a_backend. We do not think the max connections are getting exhausted, so will try the connectionPoolTimepout setting.
    Would like to know if this is experienced by anyone else and if so, what type of configuration tuning resolved this error.
    [email protected]

    My DPS configuration is as follows:
    Datasources: ds-p1,ds-p2,ds-p3,ds-p4,ds-p5
    DataSourcePools: cal-pool(p1,p2,p3), cas-pool(p4,p5) , sync-pool (p1,p2) [note: sync is failover , other pools are proportional)
    DataViews: Root (all suffixes)
    ConnectionHandlers: cas-handler, cas-handler, sycn-handler
    We have two DPS instances in the cluster and are in production. We run into this "Unable to Retrieve" error about 15 to 20 times in 24hrs. Total operations are in 600K range for the 24hrs duration. The error is quite random. I do not see any exhaustion of max-connections per data source in cn=monitor.
    Error Samples from the logs:
    SAMPLE1:
    [17/Nov/2010:09:09:01 -0800] - PROFILE - INFO - conn=1707265 assigned to connection handler cn=cal-connection-handler,cn=connection handlers,cn=config
    [17/Nov/2010:09:09:01 -0800] - CONNECT - INFO - conn=1707265 client=x.x.x.x:47432 server=dsp-p2.x.x.x:3389 protocol=LDAP
    [17/Nov/2010:09:09:01 -0800] - OPERATION - INFO - conn=1707265 op=0 BIND dn="" method="SIMPLE" version=3 controls=""
    [17/Nov/2010:09:09:01 -0800] - OPERATION - INFO - conn=1707265 op=0 BIND RESPONSE err=0 msg="" etime=0
    [17/Nov/2010:09:09:01 -0800] - OPERATION - INFO - conn=1707265 op=1 msgid=2 SEARCH base="dc=x,dc=x" scope=0 controls="" filter="(objectclass=*)" attrs="*"
    [17/Nov/2010:09:09:07 -0800] - OPERATION - INFO - conn=1707265 op=1 SEARCH RESPONSE err=52 msg="Unable to process the search request. Reason: [Original error=52] Unable to retrieve a backend SEARCH connection." nentries=0 etime=6049
    [17/Nov/2010:09:09:07 -0800] - OPERATION - INFO - conn=1707265 op=2 UNBIND
    [17/Nov/2010:09:09:07 -0800] - DISCONNECT - INFO - conn=1707265 reason="unbind"
    SAMPLE2:
    [17/Nov/2010:10:40:18 -0800] - PROFILE - INFO - conn=1737625 assigned to connection handler cn=cal-connection-handler,cn=connection handlers,cn=config
    [17/Nov/2010:10:40:18 -0800] - CONNECT - INFO - conn=1737625 client=128.x.x.x:52906 server=dsp-p2.x.x.x:389 protocol=LDAP
    [17/Nov/2010:10:40:18 -0800] - OPERATION - INFO - conn=1737625 op=0 BIND dn="uid=adm,ou=applications,dc=x,dc=x" method="SIMPLE" version=2 controls=""
    [17/Nov/2010:10:40:19 -0800] - SERVER_OP - INFO - conn=1737625 op=0 BIND dn="uid=adm,ou=applications,dc=x,dc=x" method="SIMPLE" version=2 s_msgid=157 s_conn=ds-p1:70887
    [17/Nov/2010:10:40:19 -0800] - SERVER_OP - INFO - conn=1737625 op=0 BIND RESPONSE err=0 msg="" s_conn=ds-p1:70887
    [17/Nov/2010:10:40:19 -0800] - OPERATION - INFO - conn=1737625 op=0 BIND RESPONSE err=0 msg="" etime=1261
    [17/Nov/2010:10:40:19 -0800] - OPERATION - INFO - conn=1737625 op=1 msgid=2 SEARCH base="ou=people,dc=b,dc=e" scope=2 controls="" filter="(sn=282511)" attrs="uid displayname"
    [17/Nov/2010:10:40:26 -0800] - OPERATION - INFO - conn=1737625 op=1 SEARCH RESPONSE err=52 msg="Unable to process the search request. Reason: [Original error=52] Unable to retrieve a backend SEARCH connection." nentries=0 etime=6048
    [17/Nov/2010:10:40:27 -0800] - OPERATION - INFO - conn=1737625 op=2 UNBIND
    [17/Nov/2010:10:40:27 -0800] - DISCONNECT - INFO - conn=1737625 reason="unbind"
    SAMPLE3:
    [17/Nov/2010:15:31:41 -0800] - PROFILE - INFO - conn=1846610 assigned to connection handler cn=cal-connection-handler,cn=connection handlers,cn=config
    [17/Nov/2010:15:31:41 -0800] - CONNECT - INFO - conn=1846610 client=x.x.x.x:2247 server=dsp-p2.x.x.x:3636 protocol=LDAPS
    [17/Nov/2010:15:31:41 -0800] - OPERATION - INFO - conn=1846610 op=0 BIND dn="uid=x,ou=applications,dc=x,dc=x" method="SIMPLE" version=3 controls=""
    [17/Nov/2010:15:31:47 -0800] - OPERATION - INFO - conn=1846610 op=0 BIND RESPONSE err=52 msg="[Original error=52] Unable to retrieve a backend BIND connection." etime=6050
    Edited by: berkeley.edu on Nov 18, 2010 8:40 AM

  • DPS 6 bind to backend error?

    Getting error for DPS 6. I think I have everything set up correctly. Binds to the DS are ok and anonymous thru DPS are ok. However when I bind thru DPS I get the access error below.
    conn=132 op=0 BIND RESPONSE err=1 msg="Unable to retrieve a backend BIND connection" etime=0
    Also in the DSCC under routing > data sources for the DPS is states the "operational status" as not available which I cant explain. Any ideas why I am not binding thru to backend DS?

    Thanks Ludovic!
    Actually I have tried to create another connectionhandler like directory-manager-connection-handler
    aci-source : none
    allowed-auth-methods : anonymous
    allowed-auth-methods : sasl
    allowed-auth-methods : simple
    allowed-ldap-ports : ldap
    allowed-ldap-ports : ldaps
    bind-dn-filters : cn=directory manager
    data-view-routing-custom-list : myView1
    data-view-routing-policy : all-routable
    description : for cn=Directory Manager
    domain-name-filters : any
    enable-data-view-affinity : false
    ip-address-filters : any
    is-enabled : true
    is-ssl-mandatory : false
    priority : 2
    request-filtering-policy : no-filtering
    resource-limits-policy : no-limits
    schema-check-enabled : false
    user-filter : any
    Here is my data view:
    alternate-search-base-dn : ""
    alternate-search-base-dn : dc=com
    attr-name-mappings : none
    base-dn : dc=example,dc=com
    contains-shared-entries : false
    description : -
    distribution-algorithm : none
    dn-join-rule : none
    dn-mapping-attrs : none
    dn-mapping-source-base-dn : none
    excluded-subtrees : -
    filter-join-rule : none
    is-enabled : true
    is-read-only : false
    is-routable : true
    ldap-data-source-pool : myPool1
    lexicographic-attrs : all
    lexicographic-lower-bound : none
    lexicographic-upper-bound : none
    non-viewable-attr : none
    non-writable-attr : none
    numeric-attrs : all
    numeric-default-data-view : false
    numeric-lower-bound : none
    numeric-upper-bound : none
    pattern-matching-base-object-search-filter : all
    pattern-matching-dn-regular-expression : all
    pattern-matching-one-level-search-filter : all
    pattern-matching-subtree-search-filter : all
    process-bind : -
    replication-role : master
    viewable-attr : all except non-viewable-attr
    writable-attr : all except non-writable-attr
    However, when I did ldapsearch, I still got same error
    ldapsearch -D "cn=Directory Manager" -w mypwd -h myhost -p port# -b "dc=example,dc=com" -s one "objectclass=*"
    ldap_simple_bind: Operations error
    ldap_simple_bind: additional info: Unable to retrieve a backend BIND connection
    The reason I have kept trying using cn=Directory manaer is that I don't want to make change on our application (even it's only property file) after I migrate to the new version.
    Thanks!

  • SunOneDS-5.2 bind authmethod=ssl doesn't appear to work

    Having set up DS-5.2 with SSL + allow user authentication + user entry with (binary) certificate + certmap.conf setup for user cert CA cert + ACI entry with bind rule set to
    allow (all) (userdn = ....) and (authmethod="ssl")
    client connections ARE authenticated by client certificate when passed.
    However, if the client binds with bindDN=userdn in ACI, but NOT using either a certificate nor SSL connection, the associated search request is still allowed. In other words, it appears that the "authmethod=ssl" bind rule HAS NO AFFECT!? Other ACI's on the entry deny anonymous access and allow other groups without SSL.
    The SunOneDS-5.2 Administration Guide states for authmethod="ssl",
    SSL - The client must bind to the directory over a Secure Sockets
    Layer (SSL) or Transport Layer Security (TLS) connection
    but this doesn't appear to be working in forcing an SSL bind/connection.
    It is also interesting to note that the client certificate is offered at the LDAP connection step and not at the LDAP bind step and that a subsequent bind appears to be necessary to properly affect a subsequent search. That is, with the above ACI bind rule, connect with certificate over SSL but bind as annonymous and the search fails. ANY connection with proper bindDN and bindPW satisfies the ACI and the search succeeds.
    The intention is to FORCE SSL connections for certain subtrees where the LDAP server ALSO allows NON-SSL connections for OTHER subtrees. A secondary desire is to allow SSL + certificate authentication to provide the forced SSL connection and user binding without requiring a subsequent bindDN and bindPW.
    An example of SSL + certificate connection + full user binding is:
    conn=30 op=-1 msgId=-1 - SSL 128-bit RC4; client 0.9.2342.19200300.100.1.4=Personal/User SSL Certificate, CN=......., OU=......, O=...., L=...., ST=...., C=..; issuer 0.9.2342.19200300.100.1.4=localnet10 SSL only CA Certificate, CN=SSLonlyCA, OU=......., O=..., L=...., ST=..., C=..
    conn=30 op=-1 msgId=-1 - SSL client bound as uid=NEngineer1,ou=People,o=..,c=..
    conn=30 op=0 msgId=1 - BIND dn="uid=NEngineer1,ou=People,o=..,c=.." method=128 version=3
    conn=30 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=nengineer1,ou=people,o=..,c=.."
    conn=30 op=1 msgId=2 - SRCH base="o=..,c=.." scope=2 filter="(dc=.............)" attrs="dn ........."
    conn=30 op=1 msgId=2 - RESULT err=0 tag=101 nentries=1 etime=

    Corrected - what was needed was a bind rule, boolean change from "and" to "or":
    (targetattr = "*") (version 3.0;acl "DENY all but Network Administrators access";deny (all)(groupdn != "ldap:///cn=Network Administrators,ou=Groups,o=xx,c=xx")or(authmethod!="ssl");)

  • Event Bubbling Custom Object not inheriting from control

    One of the new things flash flex and xaml have are ways which
    the event easily bubbles up to a parent that knows how to handle
    the event. Similar to exceptions travel up until someone catches
    it.
    My goal is to use the frameworks event system on custom
    objects. My custom objects are:
    ApplicationConfiguration
    through composition contains:
    SecurityCollection which contains many or no SecurityElements
    and
    FileSystemCollection.cs which contains many or no
    FileSystemElement objects
    ect ect basically defining the following xml file with custom
    objects.
    [code]
    <ApplicationConfiguration>
    <communication>
    <hardwareinterface type="Ethernet">
    <ethernet localipaddress="192.168.1.2" localport="5555"
    remoteipaddress="192.168.1.1" remoteport="5555" />
    <serial baudrate="115200" port="COM1" />
    </hardwareinterface>
    <timing type="InternalClock" />
    </communication>
    <filesystem>
    <add id="location.scriptfiles" value="c:\\" />
    <add id="location.logfiles" value="c:\\" />
    <add id="location.configurationfiles" value="c:\\" />
    </filesystem>
    <security>
    <add id="name1" value="secret1" />
    <add id="name2" value="secret2" />
    </security>
    <logging EnableLogging="true"
    LogApplicationExceptions="true" LogInvalidMessages="true"
    CreateTranscript="true" />
    </ApplicationConfiguration>
    [/code]
    basically these custom objects abstract the xml details of
    accessing attributes, writing content out of the higher application
    layers.
    These custom objects hold the application configuration which
    contains the users options. The gui application uses these
    parameters across various windows forms, modal dialog boxes ect.
    The gui has a modal dialog that allows the user to modify these
    parameters during runtime.
    basically i manage: load, store, new, edit, delete of these
    configuration files using my custom objects.
    Where would event propagation help in custom objects like
    described above?
    ConfigurationSingleton.getInstance().ApplicationConfiguration.CommunicationElement.Hardwar eInterfaceElement.EthernetElement.RemoteIPAddress
    =
    System.Net.IPAddress.Parse(this.textBoxRemoteEthernetIpAddress.Text);
    The EthernetElement should propagate a changed event up to
    the parent ApplicationConfiguration which would persist this to the
    registry, db, file or whatever backend.
    currently this logic is maintained else where. I serialize
    the root node which compositely serializing the nested nodes and i
    check of the serialization is different from that in the backend
    … This tells me if the dom was modified. It works but i would
    like an event driven system.
    how should i implement bubbling using custom objects?
    3 implementation ideas:
    1) A simple way is to implement a singleton event manager:
    EventManager.RegisterRoutedEvent
    http://msdn2.microsoft.com/en-us/library/ms742806.aspx
    I like this idea but how can you tell which object is nested
    in who… this way the event can be stopped and discontinue
    propagation?
    2) If i use binders as discussed in Apress’s book:
    Event-Based
    Programming Taking Events to the Limit
    basically a binder connects the events between seperate
    objects together… although it would work for my app, I would
    like a more generalized approach so i can reuse the event system on
    future project.
    3) how does flash flex handle this..
    objectproxy.as?
    http://www.gamejd.com/resource/apollo_alpha1_docs/apiReference/combined/mx/utils/ObjectPro xy.html#getComplexProperty()
    >Provides a place for subclasses to override how a complex
    property that needs to be either proxied or daisy chained for event
    bubbling is managed.
    how does these systems all work....? Reflection ?
    this way i can simulate this on my own custom classes.
    Thanks!

    I have a strong sensation that the OSMF project is quite dead.
    no new submits since 2010, the contact form on the offical OSMF
    project website http://www.opensourcemediaframework.com/
    returns a PHP error.
    and many unanswered questions about OSMF in this forum.
    i think it would be wise to not use OSMF if possible, although
    I'm also stuck with it since we are utilizing HDS/PHDS
    protocols which are utilized in the framework.
    otherwise its quite a head-ache.
    I'm unable to get to a video element coming from a proxied element
    that is being produced via an HDS connection.
    and haven't found any solution that works.

  • SSLSocket to support NIO - feature request voting

    Hello All,
    I know there were many discussions here regarding this subject.
    I've seen the SSLEngine solution for the problem... But I didn't like it since it is too complicated.
    For my understanding SSLSocket inherits Socket so an application that can handle Sockets should be able to handle SSLSocket without writing a specific code besides the factory.
    NIO allows Socket to be none blocking... So why SSLSocket which is a Socket does not?
    If I write a Web server in Java, why should I deal with none SSL and SSL connections in a different way?
    I recently wrote one threaded NIO server and was amazed that I could not use SSL with the same implementation.
    I've opened a feature request for Java, but they told me to gain support for this subject here before they will consider it...
    As I understand I can re-implement SSLSocket to use SSLEngine and support NIO with blocking and none blocking support... But I think Sun should do it.
    One caveat is to make sure that the SSLSocket HandshakeCompletedListener should be called by a daemon thread, so that it will not block other sockets while certificate verification occur.
    Of course when I refer to SSLSocket I also refer to SSLServerSocket.
    Can you please comment regarding this issue... Every comment will be welcomed!
    Best Regards,
    Alon Bar-Lev

    nah, I am very glad they released an engine separate from transport allowing encryption on any transport.
    I am also working on an abstraction of nio that you may be interested in if you don't want to do the security yourself......it is here...
    http://sourceforge.net/projects/channelmanager
    Right now, it only contains the api, but there are 3 implementations behind it right now with 3 to be added.
    1. Basic implementation that does just nio
    2. Secure implementation that implements same api and uses implementation 1
    3. Packettizer implementation which puts things in payloads with headers and footers
    4. (to be added) Threadpool implementation allowing a threadpool to be inserted in the stack somewhere
    5. (to be added) TestProxy implementation allowing exxceptions to be thrown on purpopse to test a system on a bad network....can test failure on bind, connect, read, write, etc....everything.
    6. denial of service layer.
    7. Exception catch layer to protect #1 and #4 mainly from bad clients that throw exceptions back to the channelmanager.
    Each one of these layers (2 - 4) implements the same api and uses the same api so 2 -4 are all proxies. You can reorganize the proxies as you want.
    The secure one is almost done. Any comments on the api will be welcome.
    thanks,
    dean

  • A startup class to enable MQ Queues to trigger MDBs in WLS 6.1(sp4)

              Hi,
              I am hoping for references to documentation or opinions on the following method
              allowing the use of MQ queues to drive MDBs in WLS. The technique involves rebinding
              the connection factory in jndi at "weblogic.jms.MessageDrivenBeanConnectionFactory"
              with MQs connection factory.
              I read in various newsgroup posts that replacing WLS' ConnectionFactory with MQ's
              in a startup class will not allow MDBs to be linked to an MQ queue because startup
              classes are run after MDB deployment during startup. However I found some unused
              in-house code which appeared to do just that and it works.
              Here is the code in abbreviated form:
              public String startup(String str, Hashtable args) throws Exception
                   bindMQFactory();
                   bindMQQueues();
                   return "";
              private void bindMQFactory() throws Exception
                   // Create MQ Factory and configure it
                   MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
                   factory.setChannel(channel );
                   factory.setHostName(host);
                   factory.setPort(Integer.parseInt(port));
                   factory.setQueueManager(qmanager);
                   factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP );
                   // bind connection factory into WLS JNDI for later use by clients
                   _wlsContext.bind( connectionFactoryJndi, factory );
                   // Force mq connection factory to be the one used for mdb's
                   _wlsContext.rebind("weblogic.jms.MessageDrivenBeanConnectionFactory", factory);
              private void bindMQQueue() throws Exception
                   // create queue and configure it
                   MQQueue queue = new MQQueue();
                   queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ );
                   queue.setBaseQueueName( mqQueueName );
                   // bind queue in WLS JNDI
                   _wlsContext.bind( wlsJndi, queue );
              Thanks in advance for any comments or opinions on the above.
              regards
              Martin
              

    Start with the white-paper:
              "Using Foreign JMS Providers with WebLogic Server"
              Note that to get transactional behavior you
              will need to use the WebLogic Messaging Bridge feature.
              Note that integrating MQ is easier in 8.1 - consider
              using WL 8.1 if you can.
              One more comment in-line.
              Martin wrote:
              > Hi,
              >
              > I am hoping for references to documentation or opinions on the following method
              > allowing the use of MQ queues to drive MDBs in WLS. The technique involves rebinding
              > the connection factory in jndi at "weblogic.jms.MessageDrivenBeanConnectionFactory"
              > with MQs connection factory.
              Not recommended. Highly not recommended. Do not use the same name
              as the internal factory. Create your own name for a CF, and change the
              weblogic ejb jar to reference your name. The above white-paper
              states how to do this.
              >
              > I read in various newsgroup posts that replacing WLS' ConnectionFactory with MQ's
              > in a startup class will not allow MDBs to be linked to an MQ queue because startup
              > classes are run after MDB deployment during startup. However I found some unused
              > in-house code which appeared to do just that and it works.
              >
              > Here is the code in abbreviated form:
              > public String startup(String str, Hashtable args) throws Exception
              > {
              >      bindMQFactory();
              >      bindMQQueues();
              >
              >      return "";
              > }
              >
              > private void bindMQFactory() throws Exception
              > {
              >
              >      // Create MQ Factory and configure it
              >      MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
              >      factory.setChannel(channel );
              >      factory.setHostName(host);
              >      factory.setPort(Integer.parseInt(port));
              >      factory.setQueueManager(qmanager);
              >      factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP );
              >
              >      // bind connection factory into WLS JNDI for later use by clients
              >      _wlsContext.bind( connectionFactoryJndi, factory );
              >
              >      // Force mq connection factory to be the one used for mdb's
              >      _wlsContext.rebind("weblogic.jms.MessageDrivenBeanConnectionFactory", factory);
              > }
              >
              > private void bindMQQueue() throws Exception
              > {
              >      // create queue and configure it
              >      MQQueue queue = new MQQueue();
              >      queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ );
              >      queue.setBaseQueueName( mqQueueName );
              >
              >      // bind queue in WLS JNDI
              >      _wlsContext.bind( wlsJndi, queue );
              > }
              >
              > Thanks in advance for any comments or opinions on the above.
              >
              > regards
              >
              > Martin
              

  • What port-range in the firewall of a Socks (e.g. JSocks) server?

    Hi there,
    I am using the JSocks implementation of a socks v5 server.
    Some of my questsions are quite general (not only specific to JSocks) and I hope that someone knows the answer. Unfortunately the forum of JSocks (sourceforge) is only rudymentary so I think this place is better to answer my questions.
    However...
    As I understand the socks proxy, the server waits on a specific port - normally 1080 and processes the client requests (bind, connect, accept...).
    For example one client requests a bind. Then the socks server opens a port locally on the socks host and (if successful) replies the new listening port and ip to the requesting client. ...
    (Forget authentication, cascaded proxies and ip-ranges at this point!)
    Now, if other clients should be able to access this port, the firewall (if any) needs to allow connection to this port.
    My questions:
    What should be an adequate port range for the socks proxy? With other words: what is the port range of the new ports that are created for the requesting clients?
    How schould a seperate firewall be configured not to conflict with a socks proxy?
    Specific to JSocks (if somebody knows this he wins a virtual cookie): What is the port range that JSocks uses if it opens (generates) new ports for its clients?
    Where is the port range defined in the jsocks - I havent found any?
    Imagine that on the same machine there are other running applications that are listening on predefined ports. (e.g. 8080, 21, ...) - what is the best way to exclude the ports in jsocks?
    Any hints and explanations are welcome!
    Edited by: krafzig on Oct 28, 2008 8:27 AM

    You only need one port.OK, initially I need only - lets say port 1080.
    But then for example a client c1 requests a bind. The socks server opens a new socket for the client (e.g. on 50000) and tells the client on which port on the socks he is now listening, right?
    In order to allow client c2 to connect to this new port the firewall needs to allow access to the new port (50000) first.
    So there are more ports - there might be hundrets or thousands, right?
    If its on a seperate box it doesn't matter. If its on the same box it should manage different ports.yes, different ports!
    However, it should allow access to the ports that the socks opens for the clients, right?
    Optimal would be a dynamic adaptation of the firewall, whenever the socks opens a new port the firewall grants access.
    I assume its configurable, so its up to you.No, unfortunately it is not configurable. At least I havent found anything.
    Probably won't either.???
    Don't use ports already used. `netstat -a` will list all the used port on that box. obviously, and Jsocks allows to configure reusage of ports by flag true/false;
    Has anybody setup a socks proxy with a firewall and knows how this is/should be done normally?
    Has anybody experiences with JSocks?

Maybe you are looking for

  • Remote not working with WinXP 64

    I have a X-FI Platinum card with the front module and remote. Under WinXP Pro everything worked fine. I have since upgraded to WinXP 64 bit Pro and the remote does not work. I have installed the latest driver for WinXP 64 (At least last weeks driver)

  • Problems with ReportDocument and multi-table dataset...

    Hi, First post here and hoping someone can help with me with this problem. I have an ASP.NET app running using CR 2008 Basic to produce invoices - these are fairly complex and use multiple tables - data used is provided in lists and they work fine wh

  • Iphone6 Trade in Scam! How can i get my full amount of money promised

    I decided to upgrade to the iPhone 6 from my iPhone 4 because the sales rep told me I would be able to receive $200 dollars so it would be free. He also told me I would be able to bring the gift card number in and have the money transferred to the ca

  • Compressor Issue

    Lately I've been experiencing issues while trying to export from compressor. The issues lies in the fact that when the process begins to export a file it severely affects my whole system for example it will not tell me an estimated length of export i

  • I send emial with links and anchors and when someone else forwards that, the links are converted to http addresses that go to gmail!

    I send out an email with many "internal" links, that is, links that go to anchors within the email. someone else picks up the email and forwards it to others. Now, instead of looking like this: #GHNNCEP the link looks like this: https://mail.google.c