pulkit mehra

Greenhorn
+ Follow
since Jun 05, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by pulkit mehra

Hi Friends ,

My server unexpectedly start working in above said scenario .Cant rely on open source servers but here what i have learned :

1)DS can be binded to java namespace or into Global JNDI section using <use-java-context> in DS file.
2)Always use DI names as per binding:
If used <use-java-context> true then mappedName = 'java:/titanDatasource'
If used <use-java-context> false then mappedName = 'titanDatasource'

See..according to my experience dependency injection gets failed due to following reason :

1)You are using server which does not support DI in web container.eg JBoss 4.x(DI work in EJB not in WEB)
2)You must have giving wrong JNDI name.Please refer to JNDI console of your server and see naming convention they follow.
My Friend

Use XA transaction for dealing with more than one resource in JTA
or
Make a seperate PU of type RESOURCE_LOCAL of Entities with whom you are dealing via MDB and use BMT with EM transactions.
Hi Amrish,

Hope this help
This is Stand Alone Client for EJB 3.0 in JBoss :
Hi Ranchers,

I am facing some problem in getting datasource from JNDI using @Resource annotation.
My server is JBoss5.1 and EJB 3.0.
My DS file

My Persistence.xml

StatelessBean

Web Client(local in Server EAR)

Problem Faced:
1)Not able to get statelessbean instance as resource injection getting failed.I have checked JMX console's JNDI view.
I am able to locate titanDatasource in Global section as well as in stateless bean ENC(linking global JNDI titanDatasource)
ServerError is :

2)I am confused between @Resource attribute name and mappedName My understanding is MappedName reference Global JNDI attributes where as name reference ENC attributes;

Please helpe me!!

Hi Ranchers,

I have tried JBoss5.1 with above said scenario and result is same(no EJBException) .
What is wrong with JBoss5. Does it implies to EJB 3.0 spec or not.
I had a very good impression of JBoss Community till now but i am afraid all has been changed since this post.
They have ignored very basic and important spec.

Please post if anyone got it right, i will be more than happy to use JBoss again.

Pulkit
Thanks Joe for your quick response.
I will definately try this on JBoss5.1 and will post the result.
Hi Ranchers,

I am preparing for SCBCD.I am stuck in below specs .(Using Jboss 4.2.1 and EJB 3.0)
It is being said in specs:

<<
If a stateless session bean, message-driven bean, or stateful session bean with a transaction-scoped persistence context calls a stateful session bean with an extended persistence context in the same JTA transaction, an IllegalStateException is thrown.
>>

Unfortunately i am not getting this error, though it does not pass the PC (Persistence Context).

Transactional Scoped SFSB


Extended Scope PC SFSB


Am i missing something or have incorect knowledge of Specs.

Thanks in Advance.
/*
I have added Mail.jar in my reference lib...This is my code and i am getting an error...i am Using MyEclipse6.0 ! PLEASE HELP ME!

*/



[ September 05, 2008: Message edited by: Rob Prime ]
15 years ago
hi folks,

please suggest me how to prepare for Generics and Collections.
I have done Kathy , khaled Mughal and Garry Cornell....but stil i am not feeling confident...please send me some good question on above topic speciall on WildCards.

Thanks
pulkit
hi folks,

please suggest me how to prepare for Generics and Collections.
hi ,frenz!!

my code is

class A
{
@Override public A hello()
{ return null; }
}

class B extends A
{
@Override public B hello(){}
{ return null; }

}

class C extends B
{
@Override public B hello(){}
{ return null; }
/*
now if i want that return type should be (A) how can i do that? Can i apply Bridge method or something else */

}


please send me help asap!!

thankyou
pulkit