<?php $my_string = filter_input(INPUT_GET, 'my_string', FILTER_SANITIZE_STRING); ?>
Source
<?php $my_string = filter_input(INPUT_GET, 'my_string', FILTER_SANITIZE_STRING); ?>
Source
if (destType.equals("queue")) { dest = (Destination) queue; } else { dest = (Destination) topic; } Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(dest); Ans :
If you've added any external libraries to the project it'll be them. For this files to be able to run in netbeans they'll need to be placed in the Java JDK folder.
ex. C:\Program Files (x86)\Java\jdk1.6.0_07\jre\lib\ext
It should be the latest version of the jdk that you have installed.
In this folder all the libraries netbeans use is placed.
The files that uses to be here is following:
dsns.jar
localedate.jar
sunjce_provider.jar
sunmscapi.jar
sunpkc11.jar
So if it's any other file that file/s you should add. Or if you know you added some files just include them in your project. private void initJMS() throws JMSException { try { jndi = new InitialContext(); } catch(Exception e) { JOptionPane.showMessageDialog(null, e); } try { ConnectionFactory connectionFactory = (ConnectionFactory)jndi.lookup("jms/ConnectionFactory"); Queue queue = (Queue)jndi.lookup("jms/Queue"); connection = connectionFactory.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); dest=(Destination)queue; producer = session.createProducer(dest); } catch(Exception e) { System.out.println(e); JOptionPane.showMessageDialog(null, e); } }Ans :
Thanks for the tidbit. This is for GlassFish: https://glassfish.dev.java.net/javaee5/docs/DG/beanr.html. Can also see this: http://weblogs.java.net/blog/kalali/archive/2006/05/step_by_step_to_2.html.
Ans 1 : Try this...
http://java.sun.com/products/jndi/tutorial/beyond/env/source.html
Apparently, my code is out in the car. But if you scroll to the bottom, you will see an example of putting value in environment using HashTable.
The approach I used was same as that, but instead of Context.Applet, I was using INITIAL_CONTEXT_FACTORY (http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/Context.html). In my case I used the context factory for NDS, but you would just put in appropriate value as indicated as a fully qualified classpath to the context factory for your application.