This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Vikram Saxena

Ranch Hand
+ Follow
since Dec 16, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vikram Saxena

Yes, you need to provide permissions to your user audit_error_logger.
You can do this by adding in messaging-users.properties and messaging-roles.properties.

And you need to pass these credentials when you are creating a Topic connection :
createTopicConnection(String userName, String password)
7 years ago
Hey can you do a quick check if the Topic has been created and its JNDI name on the JMX Console ?
7 years ago

ravikanth reddy wrote:Hello Jonilie,

In your case 31099 is the JNP port.

$JBOSS_HOME/bin/shutdown.sh -s jnp://"$PKG_NAME":31099

It will properly stops the server.



Instead of $PKG_NAME use uatappl001.opticx.com and this will work !!
So the final command should be
$JBOSS_HOME/bin/shutdown.sh -s jnp://uatappl001.opticx.com:31099
7 years ago
This can be achieved by increasing the pool size for the Message Driven Bean.

To do so you have to edit your jboss.xml and have the pool size mentioned in the container configurations, this piece of code will increase the poolsize for a particular MDB [having configuration name as "BeanName-Config"], you can have it for all the MDB's by editing the jboss.xml :



7 years ago
Then first give it a try with the correct java.naming.factory.url.pkgs for Weblogic. I think this would be the value:
java.naming.factory.url.pkgs=weblogic.jndi.factories:weblogic.corba.j2ee.naming.url

Do not update/change the jndi.properties, Add this property to the Properties object you are passing to the InitialContext.
There are cases where we are using multiple DB's

There could be multiple approaches to handle this, but what we use is
1. JTA as already mentioned
2. XA datasources.

The theory behind this approach is that when JTA is managing the transactions, it will first check the databases if they are in a state of commit, for every transaction (good case) , this will ensure that if a particular resource (database) will not be able to commit the JTA will rollback the transaction, and hence the databases will be in sync even if one of the databases as in your case would have committed successfully.

I hope it makes sense
There could be following issues which you need to check :

1. Is your server running at the URL : t3://myserver:30362 ?
2. You need to provide weblogic.jndi.WLInitialContextFactory in the classpath, have you placed the appropriate Weblogic jars in the classpath ?



Another thing that i observed was that in the error message, there is one additional property that gets printed.
java.naming.factory.url.pkgs=:com.ibm.ws.naming:com.ibm.ws.naming



This is being picked from your jndi.properties. The Application Server loads all the properties from this file when not explicitly mentioned.

Jayavardhan geepi wrote:But I want to know what is the provider URL? What will be there in that location?



A provider URL contains server information that the initial context factory uses to get an initial context. So this is the hostname and the port on which your server is accepting requests.


Jayavardhan geepi wrote:(I came to know that, the value of "java.naming.factory.initial" property is the name of the class which implements the InitialContext).



Yes, this should point to the application server's class which implements InititalContext and hence varies for every App server
Hi,

Yes, The Initital context is used to get to the base of the Application server's JNDI tree.
You have to hence pack all the details in a HashMap (Properties) object and pass it to the Initial Context constructor.
This is the way you do it for JBOSS, for other application servers you would need to change the NamingContectFactory and the url protocol (jnp for jboss and t3 for WLS as an example) :



Hope this helps

Shayan Shah wrote:thanks. Problem solved by using @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW). but I have a question, is this ok??
second, "com.arjuna.ats.jta.allowMultipleLastResources" property is not present in conf/jbossts-properies.xml for jboss 5.1.0 in default server conf.



You could make the data source xa if you feel that the operation should be in the same transaction.
Start a separate transaction only if the success/failure of the new transaction does not impact the state of the current transaction.

7 years ago
Yes,

8080 is the web port. You have to use the JNDI bind port which is mentioned in the jboss-service.xml in the
server\<server-name>\conf directly.

By default its 1099.

So if you have not hanged it the correct PROVIDER_URL would be :
jnp://164.10.10.10:1099

Also, please post the version of the Jboss App Server you are using.

7 years ago
Yes,
For creating Initial Context in Jboss you have to use jnp and not http.
And the port has to be 1099 by default if you have not changed your settings.

So,
Try and use jnp://164.10.10.10:1099 and you should get the Initial context.

Too add to IC explanation :
Initial context is basically used to get a handle on the Application Servers JNDI tree. It provides the base from where you can look up your resources.

Hope it helps
7 years ago
Can you please post the contents of the EAR. It seems there is something wrong with the way you are packing your EAR.

There is a clear ClassNotFoundException : java.lang.ClassNotFoundException: trader.BrokerModel
7 years ago
This happens because with each server startup JMS tries to create the tables in the database for itself.

You can stop it by turing the CREATE_TABLES_ON_STARTUP option to FALSE in the <db>-service.xml. This xml resides in the messaging folder, but it depends on the JBoss version you are using.


Hope this helps. But before you turn this option off make sure that the tables are created in the database Though it looks like they have been created.

Hope it helps !
7 years ago